Boost logo

Boost :

From: Bill Wade (bill.wade_at_[hidden])
Date: 1999-12-14 12:10:24

> Is it *required* for a compiler to implement
> (n/g) * x
> by dividing n/g first, before multiplying by x?

Yes, even without the parenthesis a compiler is required to get an answer
appropriate for doing the division first. However there is considerable
confusion about this. In my printing of C++PL 3rd, BS writes that the
parenthesis are required if you want to be sure of the result of a*b/c. IMO
any mistake that BS makes is likely to be repeated by compiler

(C++PL third, First printing, page 123, last paragraph of section 6.2.2
Evaluation Order).

Boost list run by bdawes at, gregod at, cpdaniel at, john at