• 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: Where is sqrtf?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Where is sqrtf? (From: Robert Purves <email@hidden>)

  • Prev by Date: Re: Compiling Objc++
  • Next by Date: Re: XCode and STL/STD code completion/code sense - possible???
  • Previous by thread: Re: Where is sqrtf?
  • Next by thread: IB 'Images' sorting algorithm...
  • Index(es):
    • Date
    • Thread