| 798 | /// \return rounded underflowing half-precision value |
| 799 | /// \exception FE_UNDERFLOW |
| 800 | template<std::float_round_style R> HALF_CONSTEXPR_NOERR unsigned int underflow(unsigned int sign = 0) |
| 801 | { |
| 802 | #if HALF_ERRHANDLING |
| 803 | raise(FE_UNDERFLOW); |
| 804 | #endif |
| 805 | return (R==std::round_toward_infinity) ? (sign+1-(sign>>15)) : |
| 806 | (R==std::round_toward_neg_infinity) ? (sign+(sign>>15)) : |
| 807 | sign; |
| 808 | } |
| 809 | |
| 810 | /// Round half-precision number. |
| 811 | /// \tparam R rounding mode to use |