5 ms·
I can't speak for C# but the Python Decimal type handle significant figures correctly. > The decimal module incorporates a notion of significant places so that
by explorigin 2y ago
I can't speak for C# but the Python Decimal type handle significant figures correctly.
> The decimal module incorporates a notion of significant places so that 1.30 + 1.20 is 2.50. The trailing zero is kept to indicate significance. This is the customary presentation for monetary applications. For multiplication, the “schoolbook” approach uses all the figures in the multiplicands. For instance, 1.3 * 1.2 gives 1.56 while 1.30 * 1.20 gives 1.5600.