commit | df56437b16ae43d0979dc040241ad4039da4ade6 | [log] [tgz] |
---|---|---|
author | Martin Storsjö <martin@martin.st> | Fri Nov 13 11:00:57 2020 +0200 |
committer | Martin Storsjö <martin@martin.st> | Fri Nov 13 12:19:37 2020 +0200 |
tree | 7bce76bac878ecd7978ce11639f0fb070db5986c | |
parent | 15e008f2098fb6e684758a7c6dc628d68b10e69c [diff] |
crt: Make log2() return exact results for powers of two These routines are used on msvcrt.dll on arm, which only provides log(). For exact powers of two, produce an exact result instead of one that only is numerically close. Defer to the normal implementation for anything other than the simple cases (negative values, denormals, infinities, etc). Signed-off-by: Martin Storsjö <martin@martin.st>