"Joseph S. Myers" <[EMAIL PROTECTED]> writes: | On Mon, 2 Oct 2006, Jan van Dijk wrote: | | > On Monday 02 October 2006 12:57, Joseph S. Myers wrote: | > > On Mon, 2 Oct 2006, Jan van Dijk wrote: | > > > * the C99 and C++ standards say *nothing* about the details of compex | > > > multiplication | > > | > > The C99 standard says that real operands aren't converted to complex, but | > > as I note in bug 24581, the compiler doesn't expect PLUS_EXPR and | > > MULT_EXPR to have arguments of different types, so the front ends might | > > need adapting to handle real * complex and real + complex specially. | > | > Dear Joseph, | > | > My question was a slightly different one. To me it is not clear whether the | > standard allows the treatment of (r,0) as r in complex operations. For | > example: is it allowed to handle (r,0)*(x,y) as r*(x,y)? | | I don't think so; at least, it might affect negative 0.
Hmm, how? [...] | > Triggered by 1*(Inf,0) = (Inf,NaN), I looked inside the compiler for the first | | (Inf,NaN) is a valid complex infinity just as (Inf,0) is; see G.3. I think his concern is about the evaluation of 1 * (Inf, 0). -- Gaby