Re: [Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Francois Maltey
Hi Waldek and all ! > Actually, now I am convinced that there is no simple "real" formula > giving correct branch cuts. Official Lisp formula for asin is > asin x == -%i*log(%i*x+sqrt(1-x^2)) > The Lisp formula stays away from branch cuts of logarithm, and only > branch cut of sqrt matters (an

Re: [Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Gabriel Dos Reis
On Wed, 17 Jan 2007, Waldek Hebisch wrote: | Gabriel Dos Reis wrote: | > Waldek Hebisch <[EMAIL PROTECTED]> writes: | > | However, the problem with asin is just one special case. We | > | would like to support many multivalued special functions (which in | > | numerical version require branch cut

Re: [Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Waldek Hebisch
Gabriel Dos Reis wrote: > Waldek Hebisch <[EMAIL PROTECTED]> writes: > | However, the problem with asin is just one special case. We > | would like to support many multivalued special functions (which in > | numerical version require branch cuts). Tracking that we get > | "correct" values on cuts

Re: [Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Waldek Hebisch
I wrote: > There is an easy workaround, put: > > asin x == -atan(-x/sqrt(1-x**2)) > After further examination I have found that this does not work (appearantly I was using different version for machine test, and analysis shows that the formula above is wrong). Actually, now I am convinced that

Re: [Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Gabriel Dos Reis
Waldek Hebisch <[EMAIL PROTECTED]> writes: | The problem here is that sin asin(7.0::COMPLEX FLOAT) give something | close to -7. This is due to wrong bunch cuts during evaliation. | Namely in trigcat we have: | | asin x == atan(x/sqrt(1-x**2)) | | this formula for asin has wrong branch cuts. Wh

[Axiom-developer] Bug 215: sin asin(7.0::COMPLEX FLOAT)

2007-01-17 Thread Waldek Hebisch
The problem here is that sin asin(7.0::COMPLEX FLOAT) give something close to -7. This is due to wrong bunch cuts during evaliation. Namely in trigcat we have: asin x == atan(x/sqrt(1-x**2)) this formula for asin has wrong branch cuts. When x is real and bigger then 1 sqrt(1-x**2) is imaginary w