[R] acos(0.5) == pi/3 FALSE
David Forrest
drf5n at maplepark.com
Mon Sep 18 23:12:21 CEST 2006
On Mon, 18 Sep 2006, [iso-8859-1] Iñaki Murillo Arcos wrote:
> Hello,
>
> I don't know if the result of
>
> acos(0.5) == pi/3
>
> is a bug or not. It looks strange to me.
Real numbers are strange. Would the result of:
acos(0.5) - pi/3
close enough to zero for you? Try help('Comparison') , ?'==' for an
explanation, or 'abs(acos(0.5) - pi/3) < 1e-9' for a solution.
Dave
--
Dr. David Forrest
drf at vims.edu (804)684-7900w
drf5n at maplepark.com (804)642-0662h
http://maplepark.com/~drf5n/
More information about the R-help
mailing list