[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44310] log and functions which use log return

From: Michael Godfrey
Subject: [Octave-bug-tracker] [bug #44310] log and functions which use log return incorrect result
Date: Wed, 25 Feb 2015 22:34:26 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

Follow-up Comment #4, bug #44310 (project octave):

The problem appears to be with the line:
 double complex an = clog(xp/xm)/2.0;
replacing this by:
 double complex ans   = (clog(xp) - clog(xm))/2.0;
corrects the problem with atanh(0 -10i)
as shown below. Using 2 calls to clog is less
efficient, but gets the right answer. I do not
know whether the problem came about due to a change in
the code produced for for xp/xm, or replacing clog(xp) - clog(xm)
by clog(xp/xm).

The attached patch tests for this error in mappers.cc

(file #33188)

Additional Item Attachment:

File name: complex_atanh_error.diff       Size:0 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]