"Michael Tiomkin" <[EMAIL PROTECTED]> writes:

>   What is interesting in your case is that the C standard defines the
> type of 'a/b' as 'double', and therefore the same rounding should be
> performed on the result.

No, the C and C++ standards allow this behavior.

>From C99 draft:

       6.3.1.8  Usual arithmetic conversions
[...]
       [#2]  The  values of floating operands and of the results of
       floating expressions may be represented in greater precision
       and  range than that required by the type; the types are not
       changed thereby.45)

       ____________________

       45)The cast and assignment operators are still  required  to
          perform  their  specified  conversions  as  described  in
          6.3.1.4 and 6.3.1.5.

--
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to