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
[SR-9759] JSONEncoder doesn't round-trip floating point values on i386 #3548
Comments
There may be nothing that we can do about this on the Swift side, but I want a bug here to track the issue. It does appear to be i386 only, which makes it less painful. |
It would be really weird if NSNumber were truncating things to word size, though. @itaiferber, @phausler? |
@belkadan It occurs even with `Float`, so it can't be that simple (also the `Double` errors would be larger if that were what's going on). |
Likely a precision issue with how @stephentyrone Is this on Darwin, or a different platform? (If Darwin, can we please get a Radar? bendjones (JIRA User) will investigate.) |
@itaiferber i386-simulator, so Darwin. |
<rdar://problem/47551161> JSONEncoder doesn't round-trip floats on i386 Simulator (maybe other platforms too?) |
Excellent, thanks! |
Comment by Ben D. Jones (JIRA) Yeah thanks @stephentyrone I'll take a look... |
Additional Detail from JIRA
md5: 8d8255d7caa873b18de3534ebf594aa2
Issue Description:
No real investigation, but we're seeing some SIMD Codable failures on i386 only:
which suggest that Float and Double values are rounded incorrectly by either JSONEncoder or JSONDecoder only on i386. Maybe an x87 excess-precision bug.
The text was updated successfully, but these errors were encountered: