Closed barak closed 13 years ago
Added fllog1p and flexpm1 to (vicare) and (ikarus).
cool.
(not i need to tweak def of atan to take advantage of it. will give it a shot. looks a little more subtle than i thought. might be easier to directly call the C math library complex routine catan(3) in order to fix this particular issue ... not that I've tested that routine for this particular issue ...)
for small x, (atan x) is approximately x, since (atan 0) is 0 and the derivative of atan at 0 is 1. However for small imaginary arguments, there is a loss of precision causing bogus low digits and, for small enough arguments, rounding down to zero.
vicare> (atan 1e-20i) 0.0+0.0i
This is caused by (log (+ 1 e)) when e is small. The "right" fix is to use the C function log1p, which means an interface to that must be created, should probably be exposed at the user level, etc.