From: John C. <co...@cc...> - 2008-08-23 00:21:01
|
Eddie Rucker scripsit: > LOL! I noticed atanh is not defined in mzscheme so had to look it up. > (define (atanh x) (* .5 (log (/ (+ 1.0 x) (- 1.0 x))))) Here is the Common Lisp discussion of where the branch cuts of the transcendental functions are: http://tinyurl.com/5rbsng . It claims that the correct function is: (define (atanh z) (log (* (+ 1 z) (sqrt (- 1 (/ 1 (expt z 2))))))) Clisp reports #C(-0.54930615 1.5707964) for (atanh -2). -- We pledge allegiance to the penguin John Cowan and to the intellectual property regime co...@cc... for which he stands, one world under http://www.ccil.org/~cowan Linux, with free music and open source software for all. --Julian Dibbell on Brazil, edited |