Results 1 to 14 of 14
  1.    #1  
    Check this out:

    In the calculator on the visor (or any palm device) subtract 0.1 from 1.8 until you reach 0... only you won't reach zero! You'll get a number very close to zero (a little less)

    This is the result of 18 binary rounding errors. It's a common problem with binary calculators. Just thought this was interesting!

    ------------------
    -Petro
    Go to The Hunger Site http://www.thehungersite.com and help eliminate hunger!
    All you have to do is click one button! No catch, no personal information requested!!
  2. #2  
    Just tried this with Kalk (a freeware RPN calculator) on my Palm IIIx, and got similar results.

    I also have an HP 6s Solar calculator (cost: $10), and tried the same thing. Got zero exactly.

    I guess there's still a reason to have a dedicated calculator around (other than real hardware buttons) after all.
  3. #3  
    not on my visor
  4. MPM
    MPM is offline
    MPM's Avatar
    Posts
    41 Posts
    #4  
    Argh!

    This bug IS in the Visor!

    Damn. I thought that programmers would be more carefull about this kind of thing after the Pentium "divide bug" fiasco.

    Frosty_Burn: Not sure why you didn't see the bug. Could it be only in certain versions of the Visor ROM? I have 3.1H2. Or are you using a different calculator other than the built in one?
  5.    #5  
    Originally posted by Frosty_Burn:
    not on my visor
    You're not doing it right. You need to enter the following:
    1.8
    -
    .1
    -
    .1
    ...(Repeat a total of 18 times)
    And you will get: -4.16333634234e-16

    It's not a visor thing, this is true with any program that does binary calulations (which is why programers, myself included, have to be very careful when writing code.) I write in C++ btw.

    Try it, if that doesn't happen, then let me know what you're doing, becuase I'd be very interested in knowing what you did differently.

    And MPM, don't worry, I don't think you'll be doing 18 identical subtraction calculations in a row
  6. kstinnett's Avatar
    Posts
    18 Posts
    Global Posts
    19 Global Posts
    #6  
    There is another thread that is pretty old about a bug in the financial calculator. Someone said they were waiting for a response from Handspring but I have not heard if anything was ever resolved. I am an MBA student and it is very frustrating to know that the present and future value calculations are not working correctly.


  7. #7  
    Jeez, I thought Palm had that licked with the patch Slimcal2 for Palm OS 1.0!
  8. MPM
    MPM is offline
    MPM's Avatar
    Posts
    41 Posts
    #8  
    Yeah, I probably wont be doing 18 subtractions in a row, but...

    I tried 0.3-.1-.1-.1 and got 2.775557561563e-17 !

    That's only three subtractions in a row.

    Interestingly, 0.2-.1-.1 does not do it, nor does 0.1-0.1.

    When bugs like this crop up, I wonder what other bugs are in the software that I don't know about.

  9. #9  
    For a more complete explaination of what's happening, take a look at this thread and look for potters post.

    http://discussion.visorcentral.com/F...ML/000328.html
  10.    #10  
    I read the post, and basically, the problem is because the calculator is using float numbers instead of double numbers (most programers should be able to tell the difference.

    Basically, this means that the program is using numbers that are less accurate, to save memory, instead of using larger numbers that take up more memory, but are more accurate.
    At least that's how I see it. Correct me if I'm wrong.

    ------------------
    -Petro

    Go to The Hunger Site and help eliminate hunger!
    All you have to do is click one button! No catch, no personal information requested!!
    Please go once a day! Every day!
  11. #11  
    Of course this is not a good thing, but, I can't imagine doing a calculation on my visor where an error of

    -4.16333634234e-16
    or 2.775557561563e-17

    would matter for a subtraction of numbers that are larger by >15 orders of magnitude.

    mportuesi - can your $10 calculator even represent numbers this small? I have a TI-7000 here and it says .00001 x .00001 x 1,000,000 = 0, if I punch it in in that order.

    A question for those who understand these things. Wouldn't using double vs float just push the problem back to a different level of accuracy? I thought this kind of problem is related to how decimal fractions are represented in binary. Isn't this the moral equivalent of trying to do 1/3 in decimal?


    [This message has been edited by huski (edited 07-08-2000).]
  12. #12  
    Originally posted by Petro:
    I read the post, and basically, the problem is because the calculator is using float numbers instead of double numbers (most programers should be able to tell the difference.
    [...]
    At least that's how I see it. Correct me if I'm wrong.
    The advanced calculator is using IEEE doubles. If it were using IEEE floats the error would be -3.11434e-07. Actually the previous step (the one that should have given us 0.1) gives me 0.0999997 when using floats.

    Note: MS Excel also using IEEE doubles, and also produces the exact same error.

    [This message has been edited by potter (edited 07-10-2000).]
  13. #13  
    huski:

    I tried the following on my HP-6S:

    .00001 * .00001 * 1000000 =

    and it gave me .00001 as the answer.
    Just doing .00001 * .00001 returns
    1e-10 as the answer.

    Of course, my calculator is by HP, whereas yours is by TI



    [This message has been edited by mportuesi (edited 07-10-2000).]
  14. nitehawk's Avatar
    Posts
    22 Posts
    Global Posts
    26 Global Posts
    #14  
    I just tried the above various tests on the calculator replacement called RPN (from nthlab.com) and it gives zero in all cases that I tried. I really like this rpn calculator. It is programable however the language is somewhat difficult to learn untill you study it.

Posting Permissions