>> For the functions in radians, I would need
>> to either store EMAX+16 decimals of pi, where EMAX is the maximal
>> exponent and 16 is the precision of floating point numbers, or be able
>> to compute them. Right now, I am cheating, using a fixed-precision
>> value of 2pi (equal to twice \c_pi_fp).
> "fixed precision" makes me think of the LaTeX2e package fp, 18 places
> before and after the decimal point. In using it I became alarmed at how
> rapidly errors propagated inwards when exponents were involved.
Indeed, sin(1e99) is currently completely wrong, as 1e99 is reduced
modulo 6.283185307179588 rather than 2ð. It appears that many
not-too-serious math libraries do this (with slightly more precise
values of 2ð). The approach does not cause too much trouble, as
identities such as sin(a+b)=sin(a)cos(b)+sin(b)cos(a) are preserved.
Essentially, what it does is to stretch (or shrink) trigonometric
functions so that they have a period equal to 6.283185307179588 rather
than 2ð. I don't like this very much, so I will be looking into how
to do proper argument reduction.
>> Comments welcome on the addition of sind and friends (and similarly
>> asind for arc-trigonometric functions, newly added), and on range
>> reduction in radians.
> sind etc, and the inverse functions, are very welcome. (But as a student
> of hyperbolic geometry, I especially look forward to the hyperbolic
> functions and inverses!)
Is this a jest, or would you actually use those functions? Hyperbolic
functions are not too hard, now that I have added a few tools to
manipulate extended precision numbers (basically, they're just a bunch
of sums and products on the result of the exponential function).
Their inverses are more tricky, and I can't promise them any time