[Git][cmucl/cmucl][rtoy-issue-78-unneded-code-code-in-complex-acos] Derive the values on the branch cuts for acosh

Raymond Toy gitlab at common-lisp.net
Sun May 24 17:18:10 UTC 2020



Raymond Toy pushed to branch rtoy-issue-78-unneded-code-code-in-complex-acos at cmucl / cmucl


Commits:
00d0cb6f by Raymond Toy at 2020-05-24T10:17:44-07:00
Derive the values on the branch cuts for acosh

Conclusion: on the branch cuts, acosh is continuous with quadrant I
for 9 <= x < 1 and with quadrant II for x < -1.  This, of course, is
consistent with Kahan's coutner-clowkwise continuity principla.

- - - - -


1 changed file:

- src/code/irrat.lisp


Changes:

=====================================
src/code/irrat.lisp
=====================================
@@ -1726,6 +1726,46 @@ Z may be any number, but the result is always a complex."
 		   (asinh (imagpart (* (conjugate sqrt-1+z)
 				       sqrt-1-z))))))))
 
+;; acosh(z) = 2*log(sqrt((x+1)/2) + sqrt((x-1)/2))
+;;
+;; For z = x, 0 <= x < 1
+;;  acosh(z) = 2*log(sqrt((x+1)/2) + sqrt((x-1)/2))
+;;           = 2*log(sqrt((x+1)/2) + i*sqrt((1-x)/2))
+;;           = 2*(log(1) + i*arg(sqrt((x+1)/2) + i*sqrt((1-x)/2)))
+;;           = 2*i*atan(sqrt((1-x)/2), sqrt((x+1)/2))
+;;           = 2*i*atan(sqrt((1-x)/(1+x)))
+;;
+;; For z = -x, x > 1
+;;  acosh(z) = 2*log(sqrt((1-x)/2) + sqrt((-x-1)/2))
+;;           = 2*log((i*sqrt((x-1)/2) + 0 + i*sqrt((1+x)/2)) + 0)
+;;           = 2*log(i*(sqrt((x-1)/2) + sqrt((1+x)/2)) + 0)
+;;           = 2*(log(sqrt((x-1)/2) + sqrt((1+x)/2)) + i*arg(sqrt((x-1)/2) + sqrt((1+x)/2)) + 0)
+;;           = 2*(log(sqrt((x-1)/2) + sqrt((1+x)/2)) + i*pi/2)
+;;           = 2*log(x+sqrt(x+1)*sqrt(x-1)) + i*pi
+;;
+;; For z = x + i0, 0 <= x < 1
+;;  acosh(z) = 2*log(sqrt((1+x)/2+i0) + sqrt((x-1)/2+i0))
+;;           = 2*log(sqrt((1+x)/2)+i0 + i*sqrt((1-x)/2) + 0)
+;;           = 2*log(sqrt((1+x)/2) + i*sqrt((1-x)/2))
+;;           = 2*(log(1) + i*arg(sqrt((1+x)/2) + i*sqrt((1-x)/2))
+;;           = 0 + 2*i*atan(sqrt((1-x)/2)/sqrt((1+x)/2)) + 
+;;           = 0 + 2*i*atan(sqrt((1-x)/(1+x))
+;;
+;; This is the same value we got for acosh(x), 0 <= x < 1.  Hence,
+;; acosh is continuous with quadrant I on the branch cut for 0 <= x <
+;; 1.
+;;
+;; Finally, for z = -x + i0, x > 1
+;;  acosh(z) = 2*log(sqrt((1-x)/2+i0) + sqrt((-x-1)/2+i0))
+;;           = 2*log(i*sqrt((x-1)/2) + 0 + i*sqrt((1+x)/2 + i0))
+;;           = 2*log(i*(sqrt((x-1)/2) + sqrt((1+x)/2)) + 0)
+;;           = 2*(log(sqrt((x-1)/2) + sqrt((1+x)/2)) + i*arg(0, (sqrt((x-1)/2) + sqrt((1+x)/2)))
+;;           = 2*(log(sqrt((x-1)/2) + sqrt((1+x)/2)) + i*pi/2)
+;;           = 2*log(sqrt((x-1)/2) + sqrt((1+x)/2)) + i*pi
+;;
+;; We see that this is the same expression for acosh(z), z < -1.
+;; Hence, acosh(z) is continuous with quadrant II on the branch cut x
+;; < -1.
 (defun complex-acosh (z)
   "Compute acosh z = 2 * log(sqrt((z+1)/2) + sqrt((z-1)/2))
 



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/00d0cb6f5f931b01000bef17626d5604216de8b0

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/00d0cb6f5f931b01000bef17626d5604216de8b0
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20200524/50ab9406/attachment-0001.htm>


More information about the cmucl-cvs mailing list