Lines Matching refs:fputil
55 return fputil::safe_clz(inputNumber);
59 return fputil::safe_clz(inputNumber);
70 template <class T> inline void set_implicit_bit(fputil::FPBits<T> &result) { in set_implicit_bit()
76 inline void set_implicit_bit<long double>(fputil::FPBits<long double> &result) {
91 eisel_lemire(typename fputil::FPBits<T>::UIntType mantissa, int32_t exp10, in eisel_lemire()
92 typename fputil::FPBits<T>::UIntType *outputMantissa, in eisel_lemire()
95 using BitsType = typename fputil::FPBits<T>::UIntType; in eisel_lemire()
114 fputil::FloatProperties<T>::EXPONENT_BIAS - clz; in eisel_lemire()
132 fputil::FloatProperties<T>::MANTISSA_WIDTH - 3)) - in eisel_lemire()
155 (fputil::FloatProperties<T>::MANTISSA_WIDTH + 3))); in eisel_lemire()
168 if ((final_mantissa >> (fputil::FloatProperties<T>::MANTISSA_WIDTH + 1)) > in eisel_lemire()
176 if (exp2 - 1 >= (1 << fputil::FloatProperties<T>::EXPONENT_WIDTH) - 2) { in eisel_lemire()
188 typename fputil::FPBits<long double>::UIntType mantissa, int32_t exp10,
189 typename fputil::FPBits<long double>::UIntType *outputMantissa,
191 using BitsType = typename fputil::FPBits<long double>::UIntType;
214 fputil::FloatProperties<long double>::EXPONENT_BIAS - clz;
247 fputil::FloatProperties<long double>::MANTISSA_WIDTH -
261 (fputil::FloatProperties<long double>::MANTISSA_WIDTH + 3));
275 (fputil::FloatProperties<long double>::MANTISSA_WIDTH + 1)) > 0) {
283 (1 << fputil::FloatProperties<long double>::EXPONENT_WIDTH) - 2) {
309 typename fputil::FPBits<T>::UIntType *outputMantissa, in simple_decimal_conversion()
325 static_cast<int64_t>(fputil::FloatProperties<T>::EXPONENT_BIAS)) { in simple_decimal_conversion()
327 *outputExp2 = fputil::FPBits<T>::MAX_EXPONENT; in simple_decimal_conversion()
334 static_cast<int64_t>(fputil::FloatProperties<T>::EXPONENT_BIAS + in simple_decimal_conversion()
335 fputil::FloatProperties<T>::MANTISSA_WIDTH)) { in simple_decimal_conversion()
375 exp2 += fputil::FloatProperties<T>::EXPONENT_BIAS; in simple_decimal_conversion()
378 if (exp2 >= fputil::FPBits<T>::MAX_EXPONENT) { in simple_decimal_conversion()
380 *outputExp2 = fputil::FPBits<T>::MAX_EXPONENT; in simple_decimal_conversion()
386 hpd.shift(fputil::FloatProperties<T>::MANTISSA_WIDTH); in simple_decimal_conversion()
387 typename fputil::FPBits<T>::UIntType final_mantissa = in simple_decimal_conversion()
388 hpd.round_to_integer_type<typename fputil::FPBits<T>::UIntType>(); in simple_decimal_conversion()
401 hpd.round_to_integer_type<typename fputil::FPBits<T>::UIntType>(); in simple_decimal_conversion()
404 if ((final_mantissa >> fputil::FloatProperties<T>::MANTISSA_WIDTH) != 0) { in simple_decimal_conversion()
410 if (final_mantissa == typename fputil::FPBits<T>::UIntType(2) in simple_decimal_conversion()
411 << fputil::FloatProperties<T>::MANTISSA_WIDTH) { in simple_decimal_conversion()
418 if (exp2 >= fputil::FPBits<T>::MAX_EXPONENT) { in simple_decimal_conversion()
506 clinger_fast_path(typename fputil::FPBits<T>::UIntType mantissa, int32_t exp10, in clinger_fast_path()
507 typename fputil::FPBits<T>::UIntType *outputMantissa, in clinger_fast_path()
509 if (mantissa >> fputil::FloatProperties<T>::MANTISSA_WIDTH > 0) { in clinger_fast_path()
513 fputil::FPBits<T> result; in clinger_fast_path()
517 result = fputil::FPBits<T>(float_mantissa); in clinger_fast_path()
533 result = fputil::FPBits<T>(float_mantissa * in clinger_fast_path()
539 result = fputil::FPBits<T>(float_mantissa / in clinger_fast_path()
554 decimal_exp_to_float(typename fputil::FPBits<T>::UIntType mantissa, in decimal_exp_to_float()
557 typename fputil::FPBits<T>::UIntType *outputMantissa, in decimal_exp_to_float()
563 static_cast<int64_t>(fputil::FloatProperties<T>::EXPONENT_BIAS) / 3) { in decimal_exp_to_float()
565 *outputExp2 = fputil::FPBits<T>::MAX_EXPONENT; in decimal_exp_to_float()
572 static_cast<int64_t>(fputil::FloatProperties<T>::EXPONENT_BIAS + in decimal_exp_to_float()
573 fputil::FloatProperties<T>::MANTISSA_WIDTH) / in decimal_exp_to_float()
595 typename fputil::FPBits<T>::UIntType first_mantissa = *outputMantissa; in decimal_exp_to_float()
615 binary_exp_to_float(typename fputil::FPBits<T>::UIntType mantissa, int32_t exp2, in binary_exp_to_float()
617 typename fputil::FPBits<T>::UIntType *outputMantissa, in binary_exp_to_float()
619 using BitsType = typename fputil::FPBits<T>::UIntType; in binary_exp_to_float()
625 (1 << fputil::FloatProperties<T>::EXPONENT_WIDTH) - 1; in binary_exp_to_float()
636 exp2 + NUMBITS + fputil::FPBits<T>::EXPONENT_BIAS - 1; in binary_exp_to_float()
641 *outputExp2 = (1 << fputil::FloatProperties<T>::EXPONENT_WIDTH) - 1; in binary_exp_to_float()
648 NUMBITS - fputil::FloatProperties<T>::MANTISSA_WIDTH - 1; in binary_exp_to_float()
672 mantissa &= fputil::FloatProperties<T>::MANTISSA_MASK; in binary_exp_to_float()
682 if (mantissa > fputil::FloatProperties<T>::MANTISSA_MASK) { in binary_exp_to_float()
695 *outputMantissa = mantissa & fputil::FloatProperties<T>::MANTISSA_MASK; in binary_exp_to_float()
723 typename fputil::FPBits<T>::UIntType *outputMantissa, in decimal_string_to_float()
725 using BitsType = typename fputil::FPBits<T>::UIntType; in decimal_string_to_float()
814 typename fputil::FPBits<T>::UIntType *outputMantissa, in hexadecimal_string_to_float()
816 using BitsType = typename fputil::FPBits<T>::UIntType; in hexadecimal_string_to_float()
901 using BitsType = typename fputil::FPBits<T>::UIntType; in strtofloatingpoint()
902 fputil::FPBits<T> result = fputil::FPBits<T>(); in strtofloatingpoint()
974 nan_mantissa |= fputil::FloatProperties<T>::QUIET_NAN_MASK; in strtofloatingpoint()
976 result = fputil::FPBits<T>(result.build_nan(nan_mantissa)); in strtofloatingpoint()
980 result = fputil::FPBits<T>(result.build_nan(nan_mantissa)); in strtofloatingpoint()