Why "21030018" convert to float normal , but "21030019" shown as scientific notation #7746
Replies: 3 comments 3 replies
-
This seems like an IDE issue and not a language issue, however you haven't even mentioned what IDE you're using. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
20130019 is exceeding the precision of float. float a1 = 21030018f;
Console.WriteLine(a1);
float a2 = 21030019f;
Console.WriteLine(a2); outputs on .NET Core:
However, I have no idea why the two values show differently in VS debugger. |
Beta Was this translation helpful? Give feedback.
-
i can't get answer from anywhere.
platfrom : .net 7
Beta Was this translation helpful? Give feedback.
All reactions