shz_log2f
SHZ_INLINE float shz_log2f(float x) SHZ_NOEXCEPT;Fast approximation for C's log2f().
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | float |
Returns
Section titled “Returns”float
- Measured maximum absolute error: 0.0573 over all positive normal floats. Exact powers of two are not exact:
shz_log2f(1.0f) returns ~0.0573f.
Warnings
Section titled “Warnings”xmust be positive.
Availability
Section titled “Availability”- C++ equivalent:
shz::log2f - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_scalar.h:456 - Module: Scalar, section "Transcendental"