Enumeration implementation. \param from number to increase/decrease \param to direction to enumerate into \return next representable number
| 1819 | /// \param to direction to enumerate into |
| 1820 | /// \return next representable number |
| 1821 | static half nexttoward(half from, long double to) |
| 1822 | { |
| 1823 | if(isnan(from)) |
| 1824 | return from; |
| 1825 | long double lfrom = static_cast<long double>(from); |
| 1826 | if(builtin_isnan(to) || lfrom == to) |
| 1827 | return half(static_cast<float>(to)); |
| 1828 | if(!(from.data_&0x7FFF)) |
| 1829 | return half(binary, (static_cast<detail::uint16>(builtin_signbit(to))<<15)+1); |
| 1830 | return half(binary, from.data_+(((from.data_>>15)^static_cast<unsigned>(lfrom<to))<<1)-1); |
| 1831 | } |
| 1832 | |
| 1833 | /// Sign implementation |
| 1834 | /// \param x first operand |
nothing calls this directly
no test coverage detected