Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fast way to get the sign of a floating point number?



On Wed, 30 Nov 2005 08:27:50, "Frederik Slijkerman"
<email@hidden> wrote:

> The SETcc family of instructions will set the AL register to 0 or 1
> depending on the current condition flags. Combined with a suitable
> comparison instruction, this will return a boolean. A good compiler will do
> this for you, though, with this function:
> 
> inline bool isSigned(float f) { return f < 0.0f; }

I wonder if gcc is "good" in this respect.

Mike

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Fast way to get the sign of a floating point number? (From: "Frederik Slijkerman" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.