Skip to content
Snippets Groups Projects
Commit 3e0a1c82 authored by rtoy's avatar rtoy
Browse files

Fix some issues with the complex functions with signed zeroes. See

comment for full details, but the issue is that Lisp says mixing a
real and a complex requires converting the real to complex before
doing the operation.  But Kahan's algorithms assume that this doesn't
happen, like z-1 should not be computed as z-(1+0*i).

One place where this was wrong was for acos(2 +/- 0i).  Kahan says
acos(2+0i) is +0 - i*acosh(2) and acos(2-0i) is +0 + i*acosh(2).  We
had this backwards for the above reason.

I think this was caused by the erroneous deftransforms for real op
complex which were removed sometime ago, causing these function to
compute the wrong thing.
parent 46eb9799
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment