bugGNU Common Lisp - Bugs: bug #15872, atanh branch cut strangeness

 
 

bug #15872: atanh branch cut strangeness

Submitted by:  None
Submitted on:  Wed 22 Feb 2006 08:39:36 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Mar 2006 05:43:16 PM UTC, comment #3:

OK, done.

Take care,

Camm Maguire <camm>
Project Administrator
Thu 02 Mar 2006 03:36:17 PM UTC, comment #2:

Camm, I'm sorry, but after further study of CLHS I've decided that GCL was correct to begin with, and I'd like to ask you to revert to the previous version of ATANH.

CLHS is, to the best of my knowledge, inconsistent about ATANH: there is a formula ((log(1 + x) - log(1 - x))/2 and there is the statement about branch cuts, and the formula implies branch cuts which are different from the statement.

((log(1 + x) - log(1 - x))/2 implies the branch cuts are (-\infty, -1) continuous with 2nd quadrant and (1, \infty) continuous with 4th. That's just what GCL was doing before.

In summary, please revert ATANH.

Robert Dodier
-unavailable-

Anonymous
Sat 25 Feb 2006 07:15:54 PM UTC, comment #1:

Greetings, and thanks for the report! This should be fixed now in cvs head and 2.6.8pre.

take care,

Camm Maguire <camm>
Project Administrator
Wed 22 Feb 2006 08:39:36 PM UTC, original submission:

GCL 2.6.7 seems to have wrong behavior for branch cut of atanh.
I also checked acos and asin and those 2 seem OK.

(1) acos and asin: CLHS says
(http://www.lispworks.com/documentation/HyperSpec/Body/f_asin_.htm)
that the branch cut on [1, \infty) is continuous w/ 4th quadrant
and on (-\infty, -1] is continuous w/ 2nd quadrant.

GCL: conforms to spec

(2) atanh: CLHS says
(http://www.lispworks.com/documentation/HyperSpec/Body/f_sinh_.htm)
that the branch cut on [1, \infty) is continuous w/ 1st quadrant
and on (-\infty, -1] is continuous w/ 3rd quadrant.

GCL: continuous w/ 4th and 2nd quadrants respectively

PS. Here's a test script:
(cl:asin #C(2.5 0.01))
(cl:asin 2.5)
(cl:asin #C(2.5 -0.01))

(cl:asin #C(-2.5 0.01))
(cl:asin -2.5)
(cl:asin #C(-2.5 -0.01))

(cl:acos #C(2.5 0.01))
(cl:acos 2.5)
(cl:acos #C(2.5 -0.01))

(cl:acos #C(-2.5 0.01))
(cl:acos -2.5)
(cl:acos #C(-2.5 -0.01))

(cl:atanh #C(2.5 0.01))
(cl:atanh 2.5)
(cl:atanh #C(2.5 -0.01))

(cl:atanh #C(-2.5 0.01))
(cl:atanh -2.5)
(cl:atanh #C(-2.5 -0.01))

Submitted by Robert Dodier (robert.dodier@gmail.com)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 25 Feb 2006 07:15:54 PM UTCcammStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1