On Tue, 19 Sep 2006, Johannes H?sing wrote:
Peter Dalgaard:
Ben Bolker [EMAIL PROTECTED] writes:
1. compose your response
I've always wondered why step 1. - often the time-consuming bit - is not
listed last.
The advice applies to the situation when answering immediately would be
Peter Dalgaard:
Ben Bolker [EMAIL PROTECTED] writes:
1. compose your response
I've always wondered why step 1. - often the time-consuming bit - is not
listed last.
The advice applies to the situation when answering immediately would be
your knee-jerk reaction. It is assumed that
Hello,
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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
On Mon, 2006-09-18 at 19:31 +0200, 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.
Inaki Murillo
Seems reasonable to me:
acos(0.5) == pi/3
[1] FALSE
print(acos(0.5), 20)
[1] 1.0471975511965978534
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
]
[mailto:[EMAIL PROTECTED] On Behalf Of Iñaki Murillo Arcos
Sent: Monday, September 18, 2006 1:32 PM
To: r-help@stat.math.ethz.ch
Subject: [R] acos(0.5) == pi/3 FALSE
Hello,
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
Iñaki Murillo Arcos [EMAIL PROTECTED] writes:
Hello,
I don't know if the result of
acos(0.5) == pi/3
is a bug or not. It looks strange to me.
Have a look in the R FAQ:
acos(0.5) - pi/3
[1] 2.220446e-16
--
O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B
On 9/18/06, Iñaki Murillo Arcos [EMAIL PROTECTED] 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.
However,
all.equal(acos(0.5), pi/3)
[1] TRUE
so you may want to check the FAQ entry on comparisons involving
floating point
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') ,
Iñaki Murillo Arcos said the following on 9/18/2006 12:31 PM:
Hello,
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@stat.math.ethz.ch mailing list
On 18-Sep-06 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.
Inaki Murillo
It is not a bug, but a feature, in that acos(0.5) and pi/3
are not computed in the same way, so (because of the small
Time for folks to re-read the posting guide?
* When responding to a very simple question, use the following algorithm:
1. compose your response
2. type 4*runif(1) at the R prompt, and wait this many hours
3. check for new posts to R-help; if no similar
Ben Bolker [EMAIL PROTECTED] writes:
Time for folks to re-read the posting guide?
* When responding to a very simple question, use the following algorithm:
1. compose your response
2. type 4*runif(1) at the R prompt, and wait this many hours
3. check for
13 matches
Mail list logo