Bizzarre decimal parts. Why do they happen?

Is there any good reason for Java to think that 12.3 - 12, for example, equals 0.3000000000000007, not just 0.3?

Java Floating Point Round Off Error and Solution | by Fasrin Aleem | Nerd For Tech | Medium

1 Like