Issue in number multiplication with 10, 20, etc

Receiving some unexpected result while simple multiplication with 10 or 20, below are some sample.

11.41 * 10 = 114.1
1.41 * 10 = 14.1
0.41 * 10 = 4.1

11.42 * 10 = 114.2
1.42 * 10 = 14.2
0.42 * 10 = 4.2
11.43 * 10 = 114.3
1.43 * 10 = 14.299999999999999 // Expected 14.3
0.43 * 10 = 4.3

11.44 * 10 = 114.39999999999999 // expected 114.4
1.44 * 10 = 14.399999999999999 // expected 14.4
0.44 * 10 = 4.4

11.45 * 10 = 114.5
1.45 * 10 = 14.5
0.45 * 10 = 4.5

11.46 * 10 = 114.60000000000001 // expected 114.6
1.46 * 10 = 14.6
0.46 * 10 = 4.6000000000000005 // expected 4.6

11.46 * 20 = 229.20000000000002 // expected 229.2
1.46 * 20 = 29.2
0.46 * 20 = 9.200000000000001

11.47 * 10.0 = 114.7
1.47 * 10.0 = 14.7
0.47 * 10.0 = 4.699999999999999

11.47 * 20.0 = 229.4
1.47 * 20.0 = 29.4
0.47 * 20.0 = 9.399999999999999

11.48 * 10.0 = 114.80000000000001
1.48 * 10.0 = 14.8
0.48 * 10.0 = 4.8

11.48 * 20.0 = 229.60000000000002
1.48 * 20.0 = 29.6
0.48 * 20.0 = 9.6

11.56 * 10 = 115.60000000000001
1.56 * 10 = 15.600000000000001
0.56 * 10 = 5.6000000000000005

10.46 * 10.0 = 104.60000000000001
10.45 * 10.0 = 104.5
0.45 * 10.0 = 4.5

I would assume this is the same reason as Help with Float

3 Likes

See also Is floating-point math broken? - Stack Overflow

3 Likes

Also Exposing Floating Point

3 Likes