• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rounding mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Rounding mode
      • From: "Jan E. Schotsman" <email@hidden>
References: 
 >Re: Rounding mode (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: Missing methods in the first responder object
  • Next by Date: Re: Missing methods in the first responder object
  • Previous by thread: Re: Rounding mode
  • Next by thread: Re: Rounding mode
  • Index(es):
    • Date
    • Thread