Re: Rounding mode
Re: Rounding mode
- Subject: Re: Rounding mode
- From: Fritz Anderson <email@hidden>
- Date: Mon, 10 Dec 2012 08:13:32 -0600
On 9 Dec 2012, at 2:30 PM, "Jan E. Schotsman" <email@hidden> wrote:
> On Dec 9, 2012, at 9:00 PM, Jean-Daniel Dupas wrote:
>
>> I don't think the C standard specify that the current rounding mode should be used when converting a float to an int.
>
> I see. Otherwise it would have been too easy.
To clarify for the record (I'm sure you've figured it out), C++ does casts dynamically, and at least _could_ change compile-time float-to-integer casts depending on the floating-point environment at run time.
C casts are done by the compiler. The compiler has no idea what floating-point environment you'll have set at run time in all possible paths through your code.
— F
--
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- <http://x4u.manoverboard.org/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden