If you were logged in you would be able to see more operations.



Environment:

Intel x86/x87, Fedora Core 16, pcc 2011/12/16


Complex divide gets wrong answer. Either divide is bad or alignment is wrong. The imaginary part of the result
has the exponent in the wrong place. So, instead of a NaN, it gets a denormal number. Complex numbers are
supposed to be treated as an array of two floatingpoint numbers.
static _Complex double res, left, right;
res = left / right; /* both left and right are 0.0+0.0*I */
Produces:
res .im=00000000fff80000=+2.12173675827594550e314
want .im=fff8000000000000=nan
left .re=0000000000000000=+0.00000000000000000e+00
left .im=0000000000000000=+0.00000000000000000e+00
right.re=0000000000000000=+0.00000000000000000e+00
right.im=0000000000000000=+0.00000000000000000e+00

Description

Complex divide gets wrong answer. Either divide is bad or alignment is wrong. The imaginary part of the result
has the exponent in the wrong place. So, instead of a NaN, it gets a denormal number. Complex numbers are
supposed to be treated as an array of two floatingpoint numbers.
static _Complex double res, left, right;
res = left / right; /* both left and right are 0.0+0.0*I */
Produces:
res .im=00000000fff80000=+2.12173675827594550e314
want .im=fff8000000000000=nan
left .re=0000000000000000=+0.00000000000000000e+00
left .im=0000000000000000=+0.00000000000000000e+00
right.re=0000000000000000=+0.00000000000000000e+00
right.im=0000000000000000=+0.00000000000000000e+00

Show » 
made changes  30/Apr/14 05:56 PM
Field 
Original Value 
New Value 
Assignee


Anders Magnusson
[ ragge
]

made changes  30/Apr/14 05:57 PM
Status

Open
[ 1
]

Resolved
[ 5
]

Resolution


Fixed
[ 1
]

made changes  02/Jun/14 03:51 PM
Resolution

Fixed
[ 1
]


Status

Resolved
[ 5
]

Reopened
[ 4
]

made changes  02/Jul/14 02:15 PM
Status

Reopened
[ 4
]

Resolved
[ 5
]

Resolution


Fixed
[ 1
]

