Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate f32-to-f64 casting in arbitrary_precision mode #1005

Merged
merged 3 commits into from Mar 27, 2023

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Mar 27, 2023

Fixes #1004.

"Arbitrary precision" needs to mean "arbitrarily low precision", too.

Caught by test_partialeq_number:

    thread 'test_partialeq_number' panicked at 'assertion failed: `(left == right)`
      left: `-3.4028235e38`,
     right: `Number(-3.4028235e38)`', tests/test.rs:2033:5
@dtolnay dtolnay merged commit 731886c into serde-rs:master Mar 27, 2023
11 checks passed
@dtolnay dtolnay deleted the f32cast branch March 27, 2023 17:00
crapStone added a commit to Calciumdibromid/CaBr2 that referenced this pull request Mar 30, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [serde_json](https://github.com/serde-rs/json) | dependencies | patch | `1.0.94` -> `1.0.95` |

---

### Release Notes

<details>
<summary>serde-rs/json</summary>

### [`v1.0.95`](https://github.com/serde-rs/json/releases/tag/v1.0.95)

[Compare Source](serde-rs/json@v1.0.94...v1.0.95)

-   Preserve f32 precision when serializing f32 -> serde_json::Value -> JSON string in "arbitrary_precision" mode ([#&#8203;1004](serde-rs/json#1004), [#&#8203;1005](serde-rs/json#1005))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yNC41IiwidXBkYXRlZEluVmVyIjoiMzUuMjQuNiJ9-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1835
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Number loses precision on f32s
1 participant