[Bf-committers] Why not use sqrtf instead of sqrt?

Ton Roosendaal bf-committers@blender.org
Sat, 19 Jun 2004 10:12:11 +0200


As far as gcc is involved, sqrtf was introduced as builtin only in  
later versions. For OSX 10.2 the gcc 3.1 compiler doesn't have it for  


On Friday, Jun 18, 2004, at 22:07 Europe/Amsterdam, Kent Mein wrote:

> In reply to Panagiotis Papadakos (papadako@csd.uoc.gr):
>> Since in many cases sqrt is used for float numbers, I think it should  
>> be
>> replaced by sqrtf, which would make the code cleaner (no casting) and
>> should also be faster in some systems! Any comments?
> Well under solaris I don't think there is a sqrtf so we'd have to do
> some nasty stuff that would result in uglier code.
> maybe a typedef in some header for SQRTF SQRTL etc....
> If you do a search through the board about the comments you'll see the
> changes I had to do on solaris and a note that was gcc specific.
> If you were using solaris's native compiler which I am slowly trying
> to get working btw... You'd have to do something different.
> I'm not sure what that is exactly at this stage, my gut tells me
> sqrt is just overloaded with solaris's compiler and it figures it out
> automatically.
> Kent
> --  
> mein@cs.umn.edu
> http://www.cs.umn.edu/~mein
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton@blender.org