! @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. */
| 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 | |
| 14507 | struct boundaries |
nothing calls this directly
no outgoing calls
no test coverage detected