[Mesa-dev] [PATCH] Improve ONE_DIV_LN2 and M_PI constants

Ian Romanick idr at freedesktop.org
Wed Dec 1 15:24:58 PST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/01/2010 01:40 PM, Matt Turner wrote:
> 1/ln(2) is equivalent to log2(e), so define it as such.
> 
> log2(e) = ln(e)/ln(2) = 1/ln(2)
> 
> M_PI is updated to add some precision (value found in my math.h header).

I wish I had noticed this when I added M_LOG2E.  It seems better to
replace the single use of ONE_DIV_LN2 (in prog_statevars.c) with M_LOG2E.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz22UgACgkQX1gOwKyEAw/N1ACgmWxnoeoUkXBpoMYPZEPgXhTP
WpkAoJeTxPT5VGR3mr3mlBGsveS2Dsfc
=gjBF
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list