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

Arne Schmitz bf-committers@blender.org
Mon, 21 Jun 2004 00:53:55 +0200


--Boundary-02=_DWh1AUtcFPcz+M0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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=20
using either

	a) Code that complies to a recent (i.e. C99) standard=20

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=20
b)...

	Arne
=20
=2D-=20
[--- PGP key FD05BED7 --- http://www.root42.de/ ---]

--Boundary-02=_DWh1AUtcFPcz+M0
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQBA1hWDzpP3gv0FvtcRAsAjAJ9akHvxmVJfK2Xi95Exso4Q+6/poACfZ0bS
v0SR4Bh8YYvplkTwZb485CM=
=ikpf
-----END PGP SIGNATURE-----

--Boundary-02=_DWh1AUtcFPcz+M0--