- 1

Doubt

1.3=(0.5×2)+0.3 so 1.3%0.5 =0.3 but I get 1.3%0.5=0.30000000000000004 also, 3.3%1.1 =1.0999999999999996 why not 0 ?[3.3=(1.1×3)+0]

6th Aug 2017, 6:58 PM
Jed Suellas
Jed Suellas - avatar
3 Answers
+ 4
This should answer your question :) http://0.30000000000000004.com
6th Aug 2017, 7:21 PM
Martin Ed
Martin Ed - avatar
+ 3
Nice find, @Martin @Jed Suellas 3.3 % 1.1 = 1.0999999999999996 Use this program: https://code.sololearn.com/WYCTOysAGnLv/?ref=app Type 3.3 and then 1.1 into the eval field. It shows: 3.2999999999999998 1.1000000000000001 Manually: 3.2999999999999998 - 1.1000000000000001 ------------------------------------------ 2.1999999999999997 - 1.1000000000000001 ------------------------------------------ 1.0999999999999996 You can also try 3.3-1.1-1.1 for the same result. Computer's 3.3 is less than human's 3.3 Computer's 1.1 is greater than human's 1.1
6th Aug 2017, 8:12 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
@Martin @Kirk Schafer Thank you so much!
7th Aug 2017, 1:00 PM
Jed Suellas
Jed Suellas - avatar