News for hackers. Stuff that matters.
Re:Cast-Free Arithmetic in Swift by p0nce on Monday October 12, 2015 @02:51PM (#10376328)
1.5 has an exact representation in floating-point, so adding 1.5 + 1.5 is always going to give you 3.0 in floating-point, also exactly represented.

Then whatever the type of integer rounding you do, you will get a solid 3.

There are no comments on this comment yet.