Hacker News new | ask | show | jobs
by MichaelGG 4053 days ago
Well other languages often offer decimal, or higher precision floats, right?
3 comments

Not really. Most languages don't have a built-in decimal type, it's usually just a library feature. Higher precision floats won't help you either, as adding more decimal places won't make 0.2 == 0.3, it will just make the difference between them slightly smaller.
Yes, .NET is a good example with a decimal type with:

Approximate Range -> (-7.9 x 1028 to 7.9 x 1028) / (100 to 28)

Precision -> 28-29 significant digits

https://msdn.microsoft.com/en-us/library/364x0z75.aspx

right, but I think he first needs some insight on how IEEE 754 floating point arithmetic works.