Closed GoogleCodeExporter closed 8 years ago
Not only with x.1
When Blockly needs to summ numbers with increment cause of fractional part.
i.e. 3.7 + 4.4 cause the problem, but 3.3 + 4.4 - not. I hope, I explained it
clearly.
Original comment by nixel2...@gmail.com
on 25 Sep 2012 at 5:31
Hello,
Welcome to the wonderful world of floating point binary arithmetic. If you
execute '3.7 + 4.4' in JavaScript, Python, Dart, or most other computer
languages, the result is '8.100000000000001'.
For detailed discussion on this error, see:
"What Every Computer Scientist Should Know About Floating-Point Arithmetic"
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
For a more accessible discussion, see:
"Python: Floating Point Arithmetic: Issues and Limitations"
http://docs.python.org/tutorial/floatingpoint.html
You might wish to round the output if this matters.
Original comment by neil.fra...@gmail.com
on 25 Sep 2012 at 6:13
Ah, you are right, i forgot about float point operations.
Thank you and sorry for disturb.
Original comment by nixel2...@gmail.com
on 25 Sep 2012 at 6:26
Original issue reported on code.google.com by
nixel2...@gmail.com
on 25 Sep 2012 at 5:27Attachments: