[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparse + complex arithmetic inconsistency
From: |
David Bateman |
Subject: |
Re: Sparse + complex arithmetic inconsistency |
Date: |
Fri, 30 Mar 2007 11:41:38 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Or a slightly modification
#include <math.h>
#include <complex.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
complex double b=1,c=I*1,d = 1+I*1,z = 0.;
// This should produce (inf,0), not (nan,nan).
printf("(%f,%f) / (%f,%f) -> (%f,%f)\n",
creal(b),cimag(b),creal(z),cimag(z),creal(b/z),cimag(b/z));
// This should produce (0,inf), not (nan,nan).
printf("(%f,%f) / (%f,%f) -> (%f,%f)\n",
creal(c),cimag(c),creal(z),cimag(z),creal(c/z),cimag(c/z));
// This should produce (inf,inf), not (nan,nan).
printf("(%f,%f) / (%f,%f) -> (%f,%f)\n",
creal(d),cimag(d),creal(z),cimag(z),creal(d/z),cimag(d/z));
return 0;
}
that all return (nan,nan) for me.
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
- Debian packages for Octave 2.9.10 available in experimental, Rafael Laboissiere, 2007/03/29
- 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/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 <=
- 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, 2007/03/30
- 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