[gccgo] Add complex numbers
Richard Henderson
rth@redhat.com
Thu Mar 11 16:21:00 GMT 2010
> + case OPERATOR_MULT:
> + {
> + // You might think that multiplying two complex numbers would
> + // be simple, and you would be right, until you start to think
> + // about getting the right answer for infinity. If one
> + // operand here is infinity and the other is anything other
> + // than zero or NaN, then we are going to wind up subtracting
> + // two infinity values. That will give us a NaN, but the
> + // correct answer is infinity.
...
We already require the mpc library. Surely some of this
can be simplified...
r~
More information about the Gcc-patches
mailing list