Huh? If I want the phase of an oscillator after 50,000 radians are you
saying that is not computable? Please elaborate.
There was a thread hereabouts many months ago on this very subject and AFAIK
no one suggested that it was not computable, it just couldn't be done with
doubles. And I see no inherent problems.
Right. This difference of opinion highlights two conflicting
interpretations of floating-point numbers:
1) They're fuzzy. Assume the first discarded bit is
somewhere between zero and one. With this viewpoint,
CBFalconer is correct that there's no point in trying
to compute a sine accurately for large arguments --
all the good bits get lost.
2) They are what they are. Assume that every floating-point
representation exactly represents some value, however that
representation arose. With this viewpoint, osmium is correct
that there's a corresponding sine that is worth computing
to full machine precision.
I've gone to both extremes over the past several decades.
Our latest math library, still in internal development,
can get exact function values for *all* argument values.
It uses multi-precision argument reduction that can gust
up to over 4,000 bits [sic]. "The Standard C Library"
represents an intermediate viewpoint -- it stays exact
until about half the fraction bits go away.
I still haven't decided how hard we'll try to preserve
precision for large arguments in the next library we ship.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com