octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Sparse matrix problem


From: John W. Eaton
Subject: Re: Re: Sparse matrix problem
Date: Thu, 4 Jan 2007 11:15:01 -0500

On  4-Jan-2007, Dmitri A. Sergatskov wrote:

| On 1/3/07, John W. Eaton <address@hidden> wrote:
| 
| >
| > What happens when you compile and run the following program?
| >
| >   #include <complex>
| >   #include <iostream>
| >
| >   int
| >   main (void)
| >   {
| >     std::cout << std::complex<double> (1.0, 1.0) / 0.0 << std::endl;
| >     return 0;
| >   }
| >
| > With g++ 4.1.2 on my system, it prints (nan,nan).  That seems like a
| > bug to me, but maybe it is standard conforming (and if it is, wtf?!?)?
| >
| 
| BTW, if I compile it with optimization on it would give (inf, inf).

Then that definitely seems like a bug, since I don't think we should
see a difference like that just because of compiler optimizations.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]