MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / frexp

Function frexp

Source/astcenc_mathlib.h:468–474  ·  view source on GitHub ↗

* @brief Extract mantissa and exponent of a float value. * * @param v The input value. * @param[out] expo The output exponent. * * @return The mantissa. */

Source from the content-addressed store, hash-verified

466 * @return The mantissa.
467 */
468static inline float frexp(float v, int* expo)
469{
470 unsigned int iv = astc::float_as_uint(v);
471 *expo = ((iv >> 23) & 0xFF) - 126;
472 iv = (iv & 0x807fffff) | 0x3f000000;
473 return astc::uint_as_float(iv);
474}
475
476/**
477 * @brief Compute the product of two sizes.

Callers 1

stbiw__linear_to_rgbeFunction · 0.50

Calls 2

float_as_uintFunction · 0.85
uint_as_floatFunction · 0.85

Tested by

no test coverage detected