-
-
Notifications
You must be signed in to change notification settings - Fork 787
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
test that shows that isNaN call is not reliable #1135
Conversation
pjfanning
commented
Nov 7, 2023
- test that demos that isNan is affected by whether we ask for the value as a double
- the test is useful even without the isNaN check
- we may want to change the impl of isNaN so that the return is not affected by getting the value as double
- see issue-1770 - big number not returned as DecimalNode jackson-databind#4191
I think it would make more sense to create a But there is an interesting question here wrt if and how to allow checking of "out of range for Double" case, as opposed to |
The test passes. I think it is useful as is. There may be merit changing the behaviour of 'isNan' method or adding a new method that checks if the number if Positive or Negative Infinity or NaN. |
I just conceptually dislike tests that verify Wrong behavior... but I can see usefulness. As to adding more methods, yeah I don't know. Problem is that for Double over-/underflow the answer depends on target: for |
@pjfanning I think I agree with this in general. But since it is very unlikely we'll try to fix this for 2.16 (due to change in behavior someone might rely), could you re-base/re-create this for 2.17? |
@cowtowncoder rebased |