Issue Details (XML | Word | Printable)

Key: PCC-450
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Fred J. Tydeman
Votes: 0
Watchers: 0
Operations

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

complex multiply wrong

Created: 08/Jun/14 12:59 AM   Updated: 01/Jul/14 06:32 PM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Environment: pcc 1.1.0 of 2014/04/20 on 32-bit Fedora Core Linux 20 on Intel i5 CPU


 Description  « Hide
float * float _Complex done wrong if all three parts are infinity. Result is NaN+NaN*I when it should be inf+inf*I.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 01/Jul/14 06:32 PM

float f1 = INFINITY;
float _Complex r1, c1 = INFINITY + INFINITY * I;
r1 = c1 * f1;
printf("%g, %g\n", creal(r1), cimag(r1));

Now returns (inf, inf) which is correct I assume?