Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: [OT] Statistics question.

by BillKSmith (Chaplain)
on Jan 30, 2013 at 15:25 UTC ( #1016084=note: print w/ replies, xml ) Need Help??


in reply to Re^3: [OT] Statistics question.
in thread [OT] Statistics question.

Are your *much* larger numbers perfect squares? If so, you can avoid the problem by factoring into the sum and difference of their square roots.

Bill


Comment on Re^4: [OT] Statistics question.
Re^5: [OT] Statistics question.
by roboticus (Canon) on Jan 30, 2013 at 23:36 UTC

    Bill:

    I was getting ginormous values like 1.6...E30 and the like. Since I'm using exp(...) to generate them, I never have nice integers to play with, so I doubt they form perfect squares or such. But I'm not current on things like that, so I could be wrong.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      It sounds like my method will not help you in this case. I have used it in solving triangles. I want $b=sqrt($c**2-$a**2). The mathematically equivalent statement $b=sqrt(($c+$a)*($c-$a)) allocates almost twice as many bits for the subtraction. Not knowing this simple trick added weeks of effort to my first real FORTRAN program.

      Bill

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016084]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-12-18 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls