[R] branch cuts of atan()

2005-05-16 Thread Robin Hankin
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.+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?

Re: [R] branch cuts of atan()

2005-05-16 Thread Prof Brian Ripley
On Mon, 16 May 2005, Robin Hankin wrote: 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.+0i) [1] 0.7853482+0i evidently atan()'s branch cuts aren't where I thought they were. Where do

Re: [R] branch cuts of atan()

2005-05-16 Thread Robin Hankin
Professor Ripley thanks for this. Always good to know that I'm not missing any documentation! The source is clear; formula 4.4.39 effectively has a branch cut at |z|=1. A 'n' S show the standard branch cuts in their figure 4.4, which are different (they were the ones I was expecting).

Re: [R] branch cuts of atan()

2005-05-16 Thread Prof Brian Ripley
On Mon, 16 May 2005, Robin Hankin wrote: Professor Ripley thanks for this. Always good to know that I'm not missing any documentation! The source is clear; formula 4.4.39 effectively has a branch cut at |z|=1. A 'n' S show the standard branch cuts in their figure 4.4, which are different (they