As far as I know, all contemporary math libraries use the same branch cuts when extending elementary functions to the complex plane. It seems that the current conventions date back to Kahan’s paper [1]. I imagine to some extent he codified existing practice, but he also settled some issues, particularly regarding floating point implementation.
I’ve verified that the following branch cuts are used by Mathematica, Common Lisp, and SciPy. If you know of any software that follows other conventions, please let me know in a comment.
The conventional branch cuts are as follows.
- sqrt: [−∞, 0)
- log: [−∞, 0]
- arcsin: [−∞, −1] and [1, ∞]
- arccos: [−∞, −1] and [1, ∞]
- arctan: [−∞i, −i] and [i, ∞i]
- arcsinh: [−∞i, −i] and [i, ∞i]
- arccosh: [−∞, 1]
- arctanh: [−∞, -1] and [1, ∞]
Related posts
- Branch points in Common Lisp
- Numbering Lambert W function branches
- Trig functions in various programming languages
[1] W. Kahan. Branch Cuts for Complex Elementary Functions or Much Ado About Nothing’s Sign Bit. The State of the Art in Numerical Analysis. Clarendon Preess (1987).