MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / normalize

Method normalize

lesson6-Segmentation/json.hpp:14479–14490  ·  view source on GitHub ↗

! @brief normalize x such that the significand is >= 2^(q-1) @pre x.f != 0 */

Source from the content-addressed store, hash-verified

14477 @pre x.f != 0
14478 */
14479 static diyfp normalize(diyfp x) noexcept
14480 {
14481 JSON_ASSERT(x.f != 0);
14482
14483 while ((x.f >> 63u) == 0)
14484 {
14485 x.f <<= 1u;
14486 x.e--;
14487 }
14488
14489 return x;
14490 }
14491
14492 /*!
14493 @brief normalize x such that the result has the exponent E

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected