-
Notifications
You must be signed in to change notification settings - Fork 675
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
NumberBox displays double 3.12 as 3.1999999999..... #9826
Comments
I wonder if the actual value stored for 3.12 is far enough away from 3.12 that Xaml doesn't round it correctly. Well, floating point numbers are hard. The actual value stored for 3.12 is: These are the C/C++ types, but float is single precision (32 bit) and double is double precision (64 bit). |
NuberBox Value propertry is double. I can bind it to the ViewModel or asign value code behind, with same result. |
Then it is internally getting converted to float. Just to clarify something important. There is a disagreement between the value in the original report. There is an image that states 3.1199999.... but the title states 3.199999..... |
You could try to use decimal, but then you are even more effed, because you can not bind to decimal and need a converter. |
Describe the bug
As in title, any other number is ok only 3.12 is 3.199999999999...
Steps to reproduce the bug
Expected behavior
No response
Screenshots
No response
NuGet package version
None
Windows version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: