-
Notifications
You must be signed in to change notification settings - Fork 1.7k
equal doubles are not identical, NaNs are identical #7024
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
Comments
cc @fsc8000. |
As I read the spec, NaNs computed the same way may be the same object, and in that case should return true (from the first point - it's the same object). |
The spec needs some adjustment around NaNs. In fact, the VM team would like to change it, but we left it this way pending feedback from the dart2js team. The basic goal is to minimize surprises to the user. We were somewhat concerned about performance implications, but the VM testing indicates this is not a problem. WIth that in mind, I await feedback regarding dart2js. |
Removed Priority-Medium label. |
Set owner to @sgmitrovic. |
AFAIK this was fixed and resolved a while ago. The tests listed do not exist any longer Added AssumedStale label. |
This issue was originally filed by [email protected]
Spec v0.13 12.1 Constants reads:
identical() is the predefined dart function that returns true iff its two
arguments are either:
• The same object.
• Of type int and have the same numeric value.
• Of type double, are not NaNs and have the same numeric value.
However, for the type double, VM violates both conditions:
Affected tests:
Language/11_Expressions/01_Constants_A18_t05
Language/11_Expressions/01_Constants_A18_t06
The text was updated successfully, but these errors were encountered: