Bug in tanh? A solution, maybe for the GCL people?
Subject: Bug in tanh? A solution, maybe for the GCL people?
From: Richard Fateman
Date: Mon, 19 Mar 2007 08:25:09 -0700
>From the comments in float.lisp, maxima source, which I presume I wrote 32
years ago.
...
;;
;;; The implementation for the special functions for a complex
;;; argument are mostly taken from W. Kahan, "Branch Cuts for Complex
;;; Elementary Functions or Much Ado About Nothing's Sign Bit", in
;;; Iserles and Powell (eds.) "The State of the Art in Numerical
;;; Analysis", pp 165-211, Clarendon Press, 1987
....
We can compute d(x):= exp(x) - 1, but do it carefully to preserve precision
when
|x| is small. X is a FP number, and a FP number is returned.
Then tanh is d(2*x)/(2+d(2*x))
lman/listinfo/maxima
>