Re: Tough problem...




"Atmapuri" <janez.makovsek@xxxxxxx> wrote

Atmapuri, You are missing the benefit of a lot of expertise by
not including the subject in the subject line. I almost skipped
opening your post myself.

If you pass a large argument to sin or cos, the
result is not accurate.

Of course! That is nature of number representations.
How can sin(2*pi/8) give exactly the square root of 2,
when that result is irrational?

In fact, you loose roughly as many
decimal places, as there are zeros in the argument:
sin(1000) => looses 3 decimal places.

What are you comparing to?

If the computation is done in extended precision,
you have a reserve of 4 decimal places,

Not exactly so.

but sometimes even that is not enough.

Enough for what?

... here is my reasoning:
sin(1000) is computed by the FPU by first
computing the reminder after division by two.
...

Why don't you first subtract out the multiples
of 2*pi?

Regards, JohnH
.



Relevant Pages

  • Re: Try Saying the Alphabet...
    ... posts from anybody with a boastful nom d'Usenet, ... appears to make a claim of expertise in computing. ...
    (alt.usage.english)
  • Re: Try Saying the Alphabet...
    ... posts from anybody with a boastful nom d'Usenet, ... appears to make a claim of expertise in computing. ...
    (alt.usage.english)
  • Re: Try Saying the Alphabet...
    ... posts from anybody with a boastful nom d'Usenet, ... appears to make a claim of expertise in computing. ... lower-case, the more so. ...
    (alt.usage.english)
  • why wont web pages load...
    ... What error do you get when opening a site? ... Do you notice any strange behaviour when IE is trying to connect to a ... Rick ... (KS Computing Ltd) ...
    (microsoft.public.windows.inetexplorer.ie6.browser)