Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 14:38:52 +0000



Post From: [ACSIL] float conversions

[2013-12-18 02:58:01]
mainframer - Posts: 9
The problem is that the binary representations of floating point numbers are actually imperfect representations.

0.01 is actually 0.0099999999776482582
3.21 is actually 3.2100000381469727

Therefore if I try to add the float representations of 0.01 and 3.21, I get an inaccurate result of 3.22000003812 instead of 3.22.

By that logic, the act of rounding would never produce an accurate result.

Date Time Of Last Edit: 2013-12-18 03:05:04