MCPcopy Create free account
hub / github.com/arun11299/cpp-jwt / normalize_to

Method normalize_to

include/jwt/json/json.hpp:14496–14504  ·  view source on GitHub ↗

! @brief normalize x such that the result has the exponent E @pre e >= x.e and the upper e - x.e bits of x.f must be zero. */

Source from the content-addressed store, hash-verified

14494 @pre e >= x.e and the upper e - x.e bits of x.f must be zero.
14495 */
14496 static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept
14497 {
14498 const int delta = x.e - target_exponent;
14499
14500 JSON_ASSERT(delta >= 0);
14501 JSON_ASSERT(((x.f << delta) >> delta) == x.f);
14502
14503 return {x.f << delta, target_exponent};
14504 }
14505};
14506
14507struct boundaries

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected