Re: Q: how to compute modulo Pi for large arguments?

From: Russell Wallace (wallacethinmintr_at_eircom.net)
Date: 06/01/04


Date: Tue, 01 Jun 2004 14:56:53 GMT

On Sun, 30 May 2004 19:37:57 +0200, Axel Vogt <nonail@axelvogt.de>
wrote:

>May be that is a naive question in numerics ...
>
>Given a positive real or natural number x <= 1E308 i want the
>the remainder of x/Pi with precision of ~ 15 - 18 digits. And
>want to use it for periodics of large arguments in a C pgm.

Is that going to be possible?

Suppose x ~= 1E300. Now, given that you mentioned 1E308 and C, I
assume you're talking about 64-bit floating point.

But that's only got ~16 digits of precision at the best of times. So
the error in the input is going to be on the order of 1E284, isn't it?
Someone with more expertise in numerical analysis please correct me if
I'm missing something, but as far as I can see you'd need a format
that can represent 1E300 with an error << pi, i.e. one that has more
than 300 digits of precision?

-- 
"Sore wa himitsu desu."
To reply by email, remove
the small snack from address.


Relevant Pages

  • Re: float bug? perl 5.8, DBI and oracle 10.2.0
    ... precision numbers in oracle, you've got 38 decimal digits to play ... and with minimal coaxing perl will handle them as ... digits from a 32 bit floating point number - I'll go out on a limb ... and hazard that one can expect 12 or so digits from a 64 bit floating ...
    (perl.dbi.users)
  • Re: Linear Algebra Challenge
    ... Since I'm using floating point, so I'll never be able to calculate one ... floating point math set to 99 digits. ... As close as I'm willing to wait if I use arbitrary precision. ... This mode is fast; when you select arbitry ...
    (comp.sys.hp48)
  • Re: Interesting math
    ... Floating point number represents a real number with 6 digits precision. ... Floating point numbers are denoted by the keyword float. ...
    (alt.usage.english)
  • Re: Interesting math
    ... Floating point number represents a real number with 6 digits precision. ... Floating point numbers are denoted by the keyword float. ...
    (alt.usage.english)
  • Re: How do you round off a float?
    ... o Floating point formats are almost always in binary, ... binary digits is very different from rounding to a certain number of decimal ... o A corollary to the above rule is use the maximum precision available on ...
    (comp.lang.cpp)