mintcalc icon indicating copy to clipboard operation
mintcalc copied to clipboard

addition error

Open nyx717 opened this issue 1 year ago • 1 comments

6.51 + 1.47 = 7.9799999999999995

???

nyx717 avatar Sep 06 '23 11:09 nyx717

That's caused by floating point numbers loosing precision and has always been a thing in computer science 😉

See this: https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules

sosauce avatar Apr 15 '24 17:04 sosauce