[sf-lug] Old Calculator Problems

Sujit K M kmsujit at gmail.com
Wed Aug 10 08:34:45 PDT 2016


Hi All,

Just inspired by the Shell Scripting sciences I got inspired by something else.

I find something strange with my calculator it calculates from
the width of the decimal on my desktop.

For Example
          1.  6*2/3 = 4
          2.  6*0.667 = 4.002
          3.  6*0.6666666667 =   4.0000000002
          4.  6*0.6666666666666667 = 4.

Are there any standards for this. #4 should also lead to a value of
4.0000000000000002.
Why is the calculator behaving strangely? There is no way in the world
width of the decimal
is affecting the result. Its a Desktop PC Calculator(Sounds Microsoft).

What is the problem? I would love to dwell into the sciences that go
into, might be an
opensource calculator with source code ofcourse.

Regards,
Sujit K M




More information about the sf-lug mailing list