>>> The sleazy way out is to just bump up fpprec for
>>> the computation and then reduce it for the final result.
>> To get sinh(1.0b-2000) correct to 16 places, you need fpprec=2015...
> I did say sleazy, not good. But why do we need 2015 digits for
> sinh(1.0b-2000)? Since sinh(x) ~ x + x^3/6 = x*(1+x^2/6), once x^2/6
> is less than 16-digits, I'll have sinh(x) accurate to 16 digits. And
> this happens for x ~ 2.5e-8 or so. Or did I screw up again?
OF COURSE you can calculate sinh(small) accurately without a huge fpprec
if you use a sensible algorithm. But your "sleazy way" (I thought)
doesn't do that -- it just uses the exponentialize/logarc expansion
blindly, but with increased fpprec. THAT is the case that requires
ridiculous fpprecs.
It's not deep math to write the good algorithms, but someone's got to do
it. Sinh and Cosh need to use the power series (like fpexp1) for
"small" values, etc.
-s