2026-06-09 / C# / .NET Core

C# double, decimal, and Business Precision

Why binary floating point has precision issues, and how to choose numeric types for money, discounts, and approximate calculation.

C#.NET

C# double, decimal, and Business Precision

double uses binary floating-point representation. It is good for scientific and approximate calculations, but not every decimal fraction can be represented exactly in binary.

How to Choose

  • Money, discounts, and tax rates: prefer decimal.
  • Graphics, physics simulation, and statistical approximation: double is common.
  • Business rules that require exact equality should not rely on direct floating-point comparison.
C# double, decimal, and Business Precision | Remi Resume