-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Change ParserBase to track floats independently from doubles #755
Comments
@plokhotnyuk could you check the test case in FasterXML/jackson-databind#3464 - result seems correct as is |
Hmmh. Yes, I agree. Unfortunately this may also require more changes for cases where coercion is used (at least for textual formats) -- in case where I think what would be really useful is/are test cases to trigger the problem. One quick question: was the specific textual representation |
@cowtowncoder I still haven't reproduced the problem - so for now, this can be ignored. When I get a chance, I'll try the jsoniter-scala benchmark scenario directly to see if I can debug it there. |
@cowtowncoder I added FasterXML/jackson-databind#3470 - it shows the issue that @plokhotnyuk reported. Would you be able to take a look? |
@cowtowncoder #757 seems to fix the issue in FasterXML/jackson-databind#3470 -- could you review that PR? |
I think this was indeed resolved via #757, closing. |
It seems like in some cases, casting a double to a float may result in a slightly different answer than parsing the original number string using Float.parseFloat.
This code in ParserBase (jackson-core) may be contributing to an issue that @plokhotnyuk described with parsing 1.199999988079071 as a float.
From my testing, it seems that casting doubles to floats may not get the same result as parsing the text representation directly with Float.parseFloat(String).
The text was updated successfully, but these errors were encountered: