Enumeration implementation. \param from number to increase/decrease \param to direction to enumerate into \return next representable number
| 1832 | /// \param to direction to enumerate into |
| 1833 | /// \return next representable number |
| 1834 | static half nexttoward(half from, long double to) |
| 1835 | { |
| 1836 | if(isnan(from)) |
| 1837 | return from; |
| 1838 | long double lfrom = static_cast<long double>(from); |
| 1839 | if(builtin_isnan(to) || lfrom == to) |
| 1840 | return half(static_cast<float>(to)); |
| 1841 | if(!(from.data_&0x7FFF)) |
| 1842 | return half(binary, (static_cast<detail::uint16>(builtin_signbit(to))<<15)+1); |
| 1843 | return half(binary, from.data_+(((from.data_>>15)^static_cast<unsigned>(lfrom<to))<<1)-1); |
| 1844 | } |
| 1845 | |
| 1846 | /// Sign implementation |
| 1847 | /// \param x first operand |
nothing calls this directly
no test coverage detected