[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparse + complex arithmetic inconsistency
From: |
Michael Goffioul |
Subject: |
Re: Sparse + complex arithmetic inconsistency |
Date: |
Fri, 30 Mar 2007 16:31:48 +0200 |
On 3/30/07, Rafael Laboissiere <address@hidden> wrote:
Does the gcc/g++ bug have something to do with the fact that the two
following lines produce different results in Octave (but shouldn't):
octave2.9:1> ([1+i 1+i] ./ [0 i]) (1)
ans = NaN - NaNi
octave2.9:2> (1+i) / 0
warning: division by zero
ans = Inf + Infi
It looks like a problem in Octave.
The first one will call
std::complex<double>::operator / (std::complex<double>, double)
the second will call
std::complex<double>::operator / (std::complex<double>, std::complex<double>)
The fact is that in current C++ implementations, these 2 methods
return different results when the second argument is 0 (0+0i in the
second case). IMO, it's more a implementation problem in standard
C++ libraries, than a problem in Octave.
Michael.
- Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental, (continued)
- Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental, Rafael Laboissiere, 2007/03/29
- Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental, David Bateman, 2007/03/29
- Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental, Rafael Laboissiere, 2007/03/30
- Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental, David Bateman, 2007/03/30
- Sparse + complex arithmetic inconsistency, Rafael Laboissiere, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, David Bateman, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, David Bateman, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, Michael Goffioul, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, David Bateman, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, Rafael Laboissiere, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency,
Michael Goffioul <=
- Re: Sparse + complex arithmetic inconsistency, Rafael Laboissiere, 2007/03/30
- Re: Sparse + complex arithmetic inconsistency, John W. Eaton, 2007/03/31
- Re: Sparse + complex arithmetic inconsistency, David Bateman, 2007/03/31
- Re: Sparse + complex arithmetic inconsistency, Rafael Laboissiere, 2007/03/31
- Re: Sparse + complex arithmetic inconsistency, Paul Kienzle, 2007/03/31
- Re: Sparse + complex arithmetic inconsistency, David Bateman, 2007/03/31