From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b1b6aecd621c27e2,start X-Google-Attributes: gidfee84,public From: stan@chirpa.mayo.edu (Andrew Staniszewski) Subject: DEC C++ BUG Date: 1996/07/03 Message-ID: <4re9tr$al5@tribune.mayo.edu>#1/1 X-Deja-AN: 163516671 distribution: world sender: stan@chirpa (Andrew Staniszewski) organization: Mayo Foundataion reply-to: staniszewski@mayo.edu newsgroups: comp.unix.osf.osf1 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 #include #include 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 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------