next up previous contents index
Next: Other operands Up: Arithmetic operands Previous: Floating types

Usual arithmetic conversions

The rules in the Standard for these conversions are slight modifications of those in the Base Document: the modifications accommodate the added types and the value preserving rules (see .2.1.1). Explicit license has been added to perform calculations in a ``wider'' type than absolutely necessary, since this can sometimes produce smaller and faster code (not to mention the correct answer more often). Calculations can also be performed in a ``narrower'' type, by the as if rule, so long as the same end result is obtained. Explicit casting can always be used to obtain exactly the intermediate types required.

The Committee relaxed the requirement that float operands be converted to double. An implementation may still choose to convert.

3 2 2


Pete Jinks
Fri Jan 19 12:31:56 GMT 1996