[R] acos(0.5) == pi/3 FALSE
mothsailor at googlemail.com
Mon Sep 18 23:08:18 CEST 2006
If you had looked at help("==") you would have seen the following:
For numerical and complex values, remember == and != do not allow for
the finite representation of fractions, nor for rounding error. Using
all.equal with identical is almost always preferable.
Then if you had tried
On 18/09/06, Iñaki Murillo Arcos <inaki.murillo at ehu.es> wrote:
> I don't know if the result of
> acos(0.5) == pi/3
> is a bug or not. It looks strange to me.
> Inaki Murillo
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP
More information about the R-help