Ticket #1059 (closed defect: fixed)
Intermediate overflow in math functions
|Reported by:||dfindlay||Owned by:|
|Component:||ANSI CL Compliance||Version:||trunk|
I wrote some code to exercise CCL's math functions and found that there were cases where intermediate computations were causing floating point overflows.
Functions affected are exp, tan, atan, tanh and atanh:
exp: fails for very large negative real rationals.
tanh: fails for complex arguments with very large real parts.
atanh: fails for numbers of the form 1 + iy for very small y.
tan and atan: analogous failures as for tanh and atanh.
I'm attaching (i) the code to exercise the functions (you just load it into Lisp) and (ii) a file of patches that fix the issues. (Apart from the exp issue, these are present in the fix to 869 - sorry.)