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

Ton Roosendaal bf-committers@blender.org
Mon, 21 Jun 2004 13:06:07 +0200


Yes anything is possible. This issue requires thorough verification (by  
the platform maintainers here). For me it's not the issue whether or  
not to follow a 'standard' since we just depend too much on getting  
versions compiled for all current platforms. For example gcc didn't  
follow C99 until recently... and probably MSVC has its own quirks as  

Our official 'minimum' gcc to support is still 2.95 or so? Do we  
officially move to 3.3? When? This is all work which might not be  
easily completed soon...

Most evidently we need proof that such code reshuffle will give actual  
& relevant benefit! I know Jean-Luc works on getting this done for OSX  
now... but it seems like only the new G5 processor will bring us true  


On Monday, Jun 21, 2004, at 06:25 Europe/Amsterdam, D.J. Capelis wrote:

> Can't this all be solved fairly easily with
> #defines for the relevent platforms?
> --- Arne Schmitz
> <arne.schmitz@mmweg.rwth-aachen.de> wrote:
>> Am Freitag, 18. Juni 2004 22:07 schrieb Kent
>> Mein:
>>> 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.
>> But the thing is: sqrtf() is a C99 function.
>> And I wonder if blender should be
>> using either
>> 	a) Code that complies to a recent (i.e. C99)
>> standard
>> or
>> 	b) Code that complies to an older albeit
>> probably more portable standard
>> 	(i.e. ANSI)
>> I for one would rather pick a), but if someone
>> comes up with a good reason for
>> b)...
>> 	Arne
> e
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton@blender.org