--
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman
J.T. Lapresté
Is the nt2::sincos algorithm (including its angle reduction) some "well
known"/"named" algorithm (whose pseudo-code/description can be found somewhere
online)? I'm asking because I'm for example still puzzled as to why the modulo
approach would not be good enough for all angles (and instead of having you
explaining it here I can then just google it ;)
> Thanks for the implicit suggestion.
My pleasure ;)
The reduction used are those that can be found in cephes library or
fdlibm classical libraries
(provided with nt2). They are not new, rather old in fact, but I do not
know the articles of reference.
The simplest algorithm, valid on a small range use the writing of pi/2
as the sum of 3
smaller and smaller terms which improve the accuracy in cancellations cases
and are harmless elsewhere.
Of course, straight computations using double (for float) or extended
for (double)
can lead in some cases to sufficently accurate results, but they are not
very intesting
because slow in simd
and not available everywhere in scalar.
J.T. Lapresté