Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculator with LOTS of decimals

  1. Jul 11, 2008 #1
    Hi, I'm trying to do some caculations involving numbers with big differences in their orders of magnitude. Unfortunately, all the cacluclating tools I can find always round off the answers too much to be of any use to me.

    For example, if I type 4.5 x 10-12 - (4.5 x 10-12 - 9.2 x 10 -30) I want a calculator that will give me 9.2 x 10 -30. But all the calculators I've used give me 0 due to unwanted rounding during the calculation. Even Python does this.

    Does anyone know where I could get a calculator or program that can do the calculation I need? I would prefer something with a simple interface resembling a hand-held calculator (like what Python uses) rather than something that requires any kind of programming.

    Thanks.
     
  2. jcsd
  3. Jul 11, 2008 #2

    rock.freak667

    User Avatar
    Homework Helper

    I think most scientific calculators will give you that answer assuming that you use the exp. button.
     
  4. Jul 11, 2008 #3

    stewartcs

    User Avatar
    Science Advisor

    The calculator that comes with Windows can do it.

    CS
     
  5. Jul 11, 2008 #4
    Hey, you're right! Thanks!
     
  6. Jul 11, 2008 #5
    You can use, for free, PARI, the package for number theory. Just look it up on the internet. Normally the program I use goes to 28 decimal places. A little secret here, found in the tutorial is to use \pX to get X places of precision. You can set that for X=50, or X=500 for that matter.

    However in the example you gave, depending upon the brackets, it sometimes insists on giving 9.1 followed by a long string of 9s. Even for 500 places its off at the last 7 giving 615927*10^-30.
     
  7. Jul 12, 2008 #6

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    I second the Pari recommendation.

    Code (Text):
    (15:02)(1+1e-20)^2-1-2e-20
    %5 = 9.99999984 E-41
    Code (Text):
    (15:02)\p 1000
       realprecision = 1001 significant digits (1000 digits displayed)
    (15:02)(1+1e-400)^2-1-2e-400
    %6 = 9.9999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999999999999999999999999999999999999
    99999999999999999999999999999999999999999999999526402 E-801
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Calculator with LOTS of decimals
  1. Decimal approximations (Replies: 3)

  2. Decimal places (Replies: 4)

  3. Decimal to odds (Replies: 4)

  4. Decimal Expansion (Replies: 2)

Loading...