close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 11 years ago

Closed 11 years ago

#90 closed defect (fixed)

(atanh -2)?

Reported by: Raymond Toy Owned by: somebody
Priority: major Milestone:
Component: Core Version: 2013-12
Keywords: Cc:

Description

CMUCL 20e says (atanh -2) is #C(-0.54930615 -1.5707964). This is consistent with what the CLHS says about atanh for x < -1 being continuous with Quadrant III because (atanh #c(-2.0 -0.0)) is the same.

However, from the definition

  atanh(z) = 1/2*(log(1+z) - log(1-z))

we have

  atanh(-2) = 1/2*(log(-1) - log(3))
            = 1/2*(i*pi - log(3))
            = -log(3)/2 + i*pi/2

That is, the imaginary part should be positive. This would be consistent with the rule that atanh is continuous with Quadrant II.

Change History (1)

comment:1 Changed 11 years ago by toy.raymond@…

Resolution: fixed
Status: newclosed

commit ca2bf8c29d22aaf44caf31f1d7b6ba77ab418be5 Author: Raymond Toy <toy.raymond@…> Date: Tue Dec 24 12:57:45 2013 -0800

Fix ticket:90

src/code/irrat.lisp: src/code/irrat-dd.lisp:

  • Remove the special case that made atanh continuous with quadrant III for x < -1 on the branch cut.

tests/trig.lisp:

  • Update tests for atanh
  • Rename rel-or-abs-error to close-to.
Note: See TracTickets for help on using tickets.