mesa: Return -FLT_MAX instead of 0 for LG2(0).

lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).
This commit is contained in:
Vinson Lee
2009-10-01 13:33:20 -06:00
committed by Brian Paul
parent 521e4b9b7e
commit 18883cdf23
+1 -1
View File
@@ -939,7 +939,7 @@ _mesa_execute_program(GLcontext * ctx,
/* The fast LOG2 macro doesn't meet the precision requirements.
*/
if (a[0] == 0.0F) {
val = 0.0F;
val = -FLT_MAX;
}
else {
val = log(a[0]) * 1.442695F;