Re: Free42  A Complex glitch? Message #2 Posted by hugh steers on 22 Sept 2011, 2:48 p.m., in response to message #1 by fhub
Hi,
i'm just going to add another twist here.
a bit late to the party, but i just tried the same acos(cos((200+200i)) on my reckon calculator. unfortunately it fails too. i am using an equally lame formula.
i changed my acos(z) routine to use this:
acos(z) = 2i*log(sqrt((1+z)/2) + i*sqrt((1z)/2))
it's from Kahan 1987, but i dont have the paper with the theory behind it. anyhow it works fine for this problem. i've changed reckon to use this way of calculating acos and asin.
> acos(cos(200+200i))
1.061929829746767261609178199.9999999999999999999999i
my 2c.
 hugh.
