MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / power

Function power

Source/external/fast_float.h:1687–1689  ·  view source on GitHub ↗

* For q in (0,350), we have that * f = (((152170 + 65536) * q ) >> 16); * is equal to * floor(p) + q * where * p = log(5**q)/log(2) = q * log(5)/log(2) * * For negative values of q in (-400,0), we have that * f = (((152170 + 65536) * q ) >> 16); * is equal to * -ceil(p) + q * where * p = log(5**-q)/log(2) = -q * log(5)/log(2) */

Source from the content-addressed store, hash-verified

1685 * p = log(5**-q)/log(2) = -q * log(5)/log(2)
1686 */
1687 constexpr fastfloat_really_inline int32_t power(int32_t q) noexcept {
1688 return (((152170 + 65536) * q) >> 16) + 63;
1689 }
1690} // namespace detail
1691
1692// create an adjusted mantissa, biased by the invalid power2

Callers 2

compute_error_scaledFunction · 0.85
compute_floatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected