Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C# is missing an example using decimal type:

Decimal uses 128 bits to hold it's data and seems to handle rounding differently to System.Double, e.g. 0.1 and 0.2 using decimals evaulates to 0.3:

> 0.1M + 0.2M 0.3

You can read more about decimal here: https://msdn.microsoft.com/en-us/library/364x0z75.aspx



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: