News for hackers. Stuff that matters.
Re:0.30000000000000004 by yellowstuff on Friday November 13, 2015 @08:48AM (#10559789)
Yes, I agree this page is misleading. It makes it look like C# is using rational numbers instead of floating point. In fact the "G" format defaults to 15 digits of precision for doubles, which is few enough to avoid ugly strings in many simple situations, but not all:

> Console.WriteLine((.1 + .2)-.3); > Result: 5.55111512312578E-17

There are no comments on this comment yet.