On Mar 15, 2005, at 11:26 pm, Thomas Lumley wrote:
On Wed, 16 Mar 2005, Peter Kleiweg wrote:
Thomas Lumley schreef op de 15e dag van de lentemaand van het jaar
2005:
x<-sqrt(2)
asin(x^2-1)
result in:
NaN
The way I would deal with this would be to force asin() to work in
complex mode:
> x <-
On Wed, 16 Mar 2005, Peter Kleiweg wrote:
Thomas Lumley schreef op de 15e dag van de lentemaand van het jaar 2005:
x<-sqrt(2)
asin(x^2-1)
result in:
NaN
Because you can't take the arcsin of 2^2-1=3.
Wrong answer.
You're right. It's actually because you can't take the arcsin of
1+4.4e-16. Same p
Thomas Lumley schreef op de 15e dag van de lentemaand van het jaar 2005:
> > x<-sqrt(2)
> > asin(x^2-1)
> > result in:
> > NaN
>
> Because you can't take the arcsin of 2^2-1=3.
Wrong answer.
Why is this a bug report?
--
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/
__
On Wed, 16 Mar 2005 [EMAIL PROTECTED] wrote:
Why does
asin(1)
result in:
1.570796
Because the arcsin of 1 is pi/2 radians.
and
x<-sqrt(2)
asin(x^2-1)
result in:
NaN
Because you can't take the arcsin of 2^2-1=3.
-thomas
__
R-devel@stat.math.ethz.ch