From: stan@chirpa.mayo.edu (Andrew Staniszewski)
Subject: DEC C++ BUG
Date: 1996/07/03 [thread overview]
Message-ID: <4re9tr$al5@tribune.mayo.edu> (raw)
I have found a bug with the V5.1 release for dividing complex numbers.
this code should, on our version of the compiler (V5.1), cause a run time
floating exception (for divide by zero). Instead, the division becomes zero.
My long term goal, of course, is to test it with the V5.3 compiler (which
is supposed to support the IEEE float standards) using the flag
-ieee_with_no_inexact,
to see if I can get the IEEE standard result (which would be, literally,
infinity). But since the division goes thru DIGITALS C++ complex library,
I question if this will work correctly.
If anyone can do the test on the V5.3 compiler and let me know the results
(and DIGITAL, if there is still a bug) I would appreciate it. I am trying to
get the support people here to upgrade to the latest and greatest compiler,
and swat this problem down for good.
here is my missbehaving code
----------------------------------------------------------------------------
#include <math.h>
#include <complex.h>
#include <iostream.h>
int main()
{
complex a;
complex b;
complex c;
a = complex(1.0,1.0);
b = 0.0;
c = a/b;
cerr << c << endl;
return 0;
}
------------------------------------------------------------------------
--
------------------------------------------------------------------------------
Andrew Staniszewski
Sr. Software Engineer
Special Purpose Processing Group
Mayo Foundation
staniszewski.andrew@mayo.edu
Please Note: Unless otherwise specified, I speak only for myself, NOT as
a representative of the Special Purpose Processor Group or Mayo Foundation
------------------------------------------------------------------------------
------------------------------------------------------------------------------
A diamond is a lump of coal that stuck with the job
------------------------------------------------------------------------------
------------------------------------------------------------------------------
reply other threads:[~1996-07-03 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox