Skip to content

R-1.7.1 regression test failure on alphaev68-dec-osf5.1

3 messages · Jeff Lewis, Peter Dalgaard, Spencer Graves

#
Thanks for the quick response.  The two sides of the equality are
definately different.  Here's what I'm seeing

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[1] 3.141593
[1] 0+1i
[1] 0+3.141593i
[1] -1+1.224647e-16i
[1] 0+3.141593i
[1] 3.141593+0i
[1] 4.440892e-16+0i
[1] 4.440892e-16
[1] 2.220446e-16
[1] FALSE

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I get the same thing from R 1.6.2, which I compiled about six months
ago.  Is there anything I can/should do to fix this?
#
"Jeff Lewis" <jlewis at genomecorp.com> writes:
Not really. It seems that your platform just has slightly less
accurate complex log/exp routines than the most common ones (Linux and
Sparc/Solaris both give exact zero). Probably the check is simply
overly stringent.

You might want to change the check to say  ... < 3*.Machine$double.eps
or so and rerun, to check whether the rest of the checks pass.
#
I just tried this with both R 1.6.2 and S-Plus 6.1 under Windows 2000: 
I got the same .Machine$double.eps as reported below, but I did NOT get 
the problem:

pi - log(exp(pi*1i)) / 1i

# reported below:  [1] 4.440892e-16+0i
# R1.6.2 and S-Plus 6.1 both gave 0+oi

Mod(pi - log(exp(pi*1i)) / 1i)

# reported below: 4.440892e-16
# R1.6.2 and S-Plus 6.1 both gave 0

.Machine$double.eps

# Same as reported: 2.220446e-16

Mod(pi - log(exp(pi*1i)) / 1i) < .Machine$double.eps

# reported below:  [1] FALSE
# R1.6.2 and S-Plus 6.1 both gave T

hth.  spencer graves
Jeff Lewis wrote: