Re: Q: how to compute modulo Pi for large arguments?
From: Axel Vogt (nonail_at_axelvogt.de)
Date: 06/01/04
- Next message: bongani masuku: "matrices"
- Previous message: Sameh Yousry: "Raviart Thomas of least order"
- In reply to: Russell Wallace: "Re: Q: how to compute modulo Pi for large arguments?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 01 Jun 2004 20:40:34 +0200
Russell Wallace wrote:
>
> 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?
Yes, i am aware of the presentation problem (or how that is
named): 10^n and 1 + 10^n certainly have a different sinus.
A check with MSVC against Maple shows that already for n=7
exactness falls to 13 digits (and not as they say in their
help it would be around n=19). Using 'gsl_sf_sin' behaves
much better (GSL can partially be interfaced with Maple),
0.5*10^10 is still exact for the 14th digit.
- Next message: bongani masuku: "matrices"
- Previous message: Sameh Yousry: "Raviart Thomas of least order"
- In reply to: Russell Wallace: "Re: Q: how to compute modulo Pi for large arguments?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|