Re: [R] 0/0, R segfaults

2005-08-19 Thread Prof Brian Ripley
To expand on Dirk's answer, R relies on fairly close compliance to IEC60559 (aka IEEE754) arithmetic in which 0/0 = NaN. As R is C/Fortran program, this is a function of your C/Fortran compilers (it is most likely an FPU setting controlled by the compiler than libc). Problems in this area

Re: [R] 0/0, R segfaults

2005-08-19 Thread Xing Qiu
Thank you very much, I did try your simple C program and it works without any problem. I even tried some more sophisticated examples, and they all print out nan instead of a segfault. My computer has a Pentium 4 CPU, and I compiled R with the following flags (these are just my default compiler

Re: [R] 0/0, R segfaults

2005-08-19 Thread Xing Qiu
I just found out that I can do: x - 0/0 in my R without any problem, it is only when I was trying to print the value of x by simply type x and return, R crashed with a sigh of segfault This is so wierd. I will try to report it to the Gentoo forum and see if any other gentoo user has the

Re: [R] 0/0, R segfaults

2005-08-19 Thread Peter Dalgaard
Xing Qiu [EMAIL PROTECTED] writes: Thank you very much, I did try your simple C program and it works without any problem. I even tried some more sophisticated examples, and they all print out nan instead of a segfault. My computer has a Pentium 4 CPU, and I compiled R with the following

[R] 0/0, R segfaults

2005-08-18 Thread Xing Qiu
Hi, I noticed that when I was conducting some calculation involving finding correlation coeficients, R stopped abnormally. So I did some research, and find out that 0/0 was the culprit. For sure 0/0 is not a valid expression, but R should give a warning, an error msg or NaN instead of

Re: [R] 0/0, R segfaults

2005-08-18 Thread Dirk Eddelbuettel
On 18 August 2005 at 16:01, Xing Qiu wrote: | Hi, | | I noticed that when I was conducting some calculation involving | finding correlation coeficients, R stopped abnormally. So I did some | research, and find out that 0/0 was the culprit. For sure 0/0 is not | a valid expression, but R