gallivm: Add a note about log2 computation and denormalized numbers.

This commit is contained in:
José Fonseca 2011-07-20 14:53:59 -07:00
parent af82ff556c
commit 5161aff48a
1 changed files with 6 additions and 0 deletions

View File

@ -2465,6 +2465,12 @@ lp_build_log2_approx(struct lp_build_context *bld,
assert(type.floating && type.width == 32);
/*
* We don't explicitly handle denormalized numbers. They will yield a
* result in the neighbourhood of -127, which appears to be adequate
* enough.
*/
i = LLVMBuildBitCast(builder, x, int_vec_type, "");
/* exp = (float) exponent(x) */