Re: IOS floating point performance
Re: IOS floating point performance
- Subject: Re: IOS floating point performance
- From: John McCall <email@hidden>
- Date: Thu, 08 Aug 2013 11:12:11 -0700
On Aug 8, 2013, at 11:04 AM, Scott Ribe <email@hidden> wrote:
> 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!!!
To which the obvious rejoinder is: maybe you should get out a little more, grandpa. :)
When a rule hasn’t been in force for over twenty years, it might be time to realize that it’s not the rule anymore.
John.
_______________________________________________
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