[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sqrt function, NaN and complex number
From: |
Dmitri A. Sergatskov |
Subject: |
Re: sqrt function, NaN and complex number |
Date: |
Fri, 10 Dec 2004 13:32:56 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041127) |
Dmitri A. Sergatskov wrote:
John W. Eaton wrote:
In any case, I don't think it is really a bug in Octave.
What happens if you try a simple C++ program to test sqrt(NaN+NaN*i)?
That does seem to work OK:
I guess I spoke too soon. It appears that it breaks if I use
any optimization flag to g++:
address@hidden divzero]$ g++ -Wall -march=athlon-mp test4.cc -o test4
test4.cc: In function `int main()':
test4.cc:6: warning: division by zero in `1.0e+0 / 0.'
test4.cc:6: warning: division by zero in `-1.0e+0 / 0.'
address@hidden divzero]$ ./test4
z1: (inf,-inf)
z2: (nan,nan)
z3: (nan,nan)
address@hidden divzero]$ g++ -Wall -O -march=athlon-mp test4.cc -o test4
test4.cc: In function `int main()':
test4.cc:6: warning: division by zero in `1.0e+0 / 0.'
test4.cc:6: warning: division by zero in `-1.0e+0 / 0.'
address@hidden divzero]$ ./test4
(it hangs here)
(I am off to bugzilla.)
Sincerely,
Dmitri.
--
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- sqrt function, NaN and complex number, Samir Sharshar, 2004/12/10
- Re: sqrt function, NaN and complex number, Per Persson, 2004/12/10
- Re: sqrt function, NaN and complex number, Dmitri A. Sergatskov, 2004/12/10
- Re: sqrt function, NaN and complex number, John W. Eaton, 2004/12/10
- Re: sqrt function, NaN and complex number, Dmitri A. Sergatskov, 2004/12/10
- Re: sqrt function, NaN and complex number,
Dmitri A. Sergatskov <=
- Re: sqrt function, NaN and complex number, John W. Eaton, 2004/12/10
- Re: sqrt function, NaN and complex number, Dmitri A. Sergatskov, 2004/12/10