Boost logo

Boost :

From: Ken Hagan (K.Hagan_at_[hidden])
Date: 2003-12-19 08:23:15

Matthias Schabel wrote:
> Absolutely - I've never proposed changing the underlying
> implementations of trig functions (or other functions) - using radians
> is obviously the best implementation.

Oddly enough, there has been a thread in comp.arch.arithmetic (?)
on this subject recently where it was pointed out that Ada doesn't
consider this obvious at all. It has a 2-arg form for most of the
trig functions where, for example...

    assert( sin(36000030.0, 360.0) );

computes the sine of the 1st argument in degrees (the 360 is the size
of one complete revolution) and the function is required to perform
the argument reduction exactly and so we can depend upon the assertion
not firing.

(Lest anyone get the wrong impression, the 1-argument form should
*not* be implemented as an inline call to this 2-argument version!)

Boost list run by bdawes at, gregod at, cpdaniel at, john at