Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

floating point error

>>> 1.2 - 1.0
>>> 0.19999999999996
It’s a normal case encountered when handling floating-point numbers internally in a 
system. It’s a problem caused when the internal representation of floating-point 
numbers, which uses a fixed number of binary digits to represent a decimal number. It 
is difficult to represent some decimal number in binary, so in many cases, it leads to
small roundoff errors.
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #floating #point #error
ADD COMMENT
Topic
Name
7+6 =