0

Why computer did not store float accuretly

4th Jan 2018, 1:30 PM
prabhakar nayan Kumar
prabhakar nayan Kumar - avatar
3 Respostas
+ 4
Due to binary system, computer can never calculate faction to 100% accurate.
4th Jan 2018, 1:32 PM
Calviղ
Calviղ - avatar
+ 3
The problem is not only in computers. Computers use base 2 numbers and we use base 10. Every base has problematic numbers. A problematic number in base 10 is one third (1/3) We can not write it accurately. 0.333333333 is not accurate. Base 2 also has problematic numbers. However, you can use decimal data types for the precision. (note: they function very differently but are more accurate)
4th Jan 2018, 1:35 PM
Lil Taco
Lil Taco - avatar
0
thanks
4th Jan 2018, 1:37 PM
prabhakar nayan Kumar
prabhakar nayan Kumar - avatar