Re: Where is sqrtf?
Re: Where is sqrtf?
- Subject: Re: Where is sqrtf?
- From: Shaun Wexler <email@hidden>
- Date: Mon, 10 Jan 2005 23:29:14 -0800
On Jan 8, 2005, at 7:18 PM, Robert Purves wrote:
How can I persuade Xcode that sqrtf exists?
If that's the only single-precision transcendental you need, try
something like this:
#include <ppc_intrinsics.h>
float sqrtef(float x)
{
float f = __frsqrtes(x);
// f = __fsels(f, f, 0.0f); // return 0 if NaN or -inf
return x * (f * 0.5f * __fnmsubs(f * f, x, 3.0f));
}
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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