Re: IOS floating point performance
Re: IOS floating point performance
- Subject: Re: IOS floating point performance
- From: Scott Ribe <email@hidden>
- Date: Thu, 08 Aug 2013 12:04:08 -0600
On Aug 8, 2013, at 11:50 AM, Jens Alfke <email@hidden> wrote:
> I can’t quote you from the C language spec, but I’d be very surprised if this were true. The result of (type)+(type) is the same (type), for all numeric types; same for the other built-in operators.
>
On Aug 8, 2013, at 11:19 AM, John McCall <email@hidden> wrote:
> If all the operands to an operator are floats, the operation occurs in float, and
> the type of the result will be float.
Good god, I am old, and you two are making me feel it today. I usually turn to Harbison & Steele for plain C questions, and here's what the 5th Edition (2002) says:
"Prior to Standard C, implementations were required to convert all values of type float to type double before any operations were performed… In Standard C, operations can now be performed using type float…"
So, in summary: GET OFF MY LAWN YOU DAMN KIDS!!!
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden