gallivm: Add a note about log2 computation and denormalized numbers.
This commit is contained in:
parent
af82ff556c
commit
5161aff48a
|
@ -2465,6 +2465,12 @@ lp_build_log2_approx(struct lp_build_context *bld,
|
||||||
|
|
||||||
assert(type.floating && type.width == 32);
|
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, "");
|
i = LLVMBuildBitCast(builder, x, int_vec_type, "");
|
||||||
|
|
||||||
/* exp = (float) exponent(x) */
|
/* exp = (float) exponent(x) */
|
||||||
|
|
Loading…
Reference in New Issue