Hacker News new | ask | show | jobs
by covidcovidcovid 2257 days ago
If you write in C# decimal a = 0.1m; decimal b = 0.2m; var result = a + b; then you will get exactly 0.3, because decimal is a special high-precision numeric type that doesn't have such issues.