[R] branch cuts of atan()

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Mon 16 May 2005 - 18:12:30 EST


Hi

the following gave me a shock:

> atan(2)

[1] 1.107149
> atan(2+0i)

[1] -0.4636476+0i
>

or, perhaps more of a gotcha:

> atan(1.0001+0i)

[1] -0.7853482+0i
> atan(0.9999+0i)

[1] 0.7853482+0i

>

evidently atan()'s branch cuts aren't where I thought they were.

Where do I look for documentation on this?

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon May 16 18:18:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:46 EST