[Bf-committers] Why not use sqrtf instead of sqrt?
D.J. Capelis
bf-committers@blender.org
Sun, 20 Jun 2004 21:25:26 -0700 (PDT)
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