Lines Matching defs:exponent

225   // Number of bits that represent the exponent.
229 // The bias of the exponent. (How much we need to subtract from the stored
235 // 1 sign bit, 8 exponent bits, 23 fractional bits.
249 // 1 sign bit, 11 exponent bits, 52 fractional bits.
263 // 1 sign bit, 5 exponent bits, 10 fractional bits.
328 // The least significant bit in the exponent, which is also the bit
341 // The bits that represent the exponent.
345 // How far left the exponent is shifted.
352 // The maximum representable unbiased exponent.
355 // The minimum representable exponent for normalized numbers.
366 // Returns the bits associated with the exponent, shifted to start at the
373 // Returns the exponent in unbiased form. This is the exponent in the
384 // If the number was normalized, returns the unbiased exponent.
385 // If the number was denormal, normalize the exponent first.
424 // The exponent is expected to be unbiased, meaning an exponent of
429 bool negative, int_type exponent, uint_type significand,
433 if (exponent <= min_exponent) {
441 while (exponent < min_exponent) {
443 ++exponent;
446 if (exponent == min_exponent) {
456 exponent = static_cast<int_type>(exponent + exponent_bias);
457 assert(exponent >= 0);
460 exponent = static_cast<uint_type>((exponent << exponent_left_shift) &
463 new_value = static_cast<uint_type>(new_value | (exponent | significand));
655 int_type exponent = getUnbiasedExponent();
656 if (exponent == min_exponent) {
657 // If we are denormal, normalize the exponent, so that we can encode
659 exponent = static_cast<int_type>(exponent + 1);
662 exponent = static_cast<int_type>(exponent - 1);
671 ((exponent + carried) > static_cast<int_type>(other_T::exponent_bias) ||
705 negate, static_cast<other_int_type>(exponent), rounded_significand,
753 const uint_type exponent = static_cast<uint_type>(
759 const bool is_zero = exponent == 0 && fraction == 0;
760 const bool is_denorm = exponent == 0 && !is_zero;
762 // exponent contains the biased exponent we have to convert it back into
764 int_type int_exponent = static_cast<int_type>(exponent - HF::exponent_bias);
766 // exponent.
769 // If we are denorm, then start shifting, and decreasing the exponent until
948 // either 0x0p+exponent_bias can be specified or any exponent greater than
1012 int_type exponent = HF::exponent_bias;
1025 // starts the exponent.
1040 // part of the float, and we have to adjust the exponent accordingly.
1046 if (!detail::saturated_inc(exponent)) {
1057 // We have not found our exponent yet, so we have to fail.
1078 // Handle modifying the exponent here this way we can handle
1081 if (!detail::saturated_dec(exponent)) {
1095 // We still have not found our 'p' exponent yet, so this is not a valid
1105 // In hex floats syntax, the binary exponent is required.
1110 // The magnitude of the exponent, as written, or the sentinel value to signal
1114 // exponent. We'll assume that -written_exponent_overflow is valid for the
1115 // type. Later we may add 1 or subtract 1 from the adjusted exponent, so leave
1130 // Hex-floats express their exponent as decimal.
1134 // The exponent is very big. Saturate rather than overflow the exponent.
1148 // Binary exponent had no digits.
1154 // Now fold in the exponent bias into the written exponent, updating exponent.
1156 if (written_exponent >= 0 && exponent >= 0) {
1158 if (written_exponent_overflow - exponent > written_exponent) {
1159 exponent = static_cast<int_type>(written_exponent + exponent);
1161 exponent = written_exponent_overflow;
1163 } else if (written_exponent < 0 && exponent < 0) {
1165 if (written_exponent_overflow + exponent > -written_exponent) {
1166 exponent = static_cast<int_type>(written_exponent + exponent);
1168 exponent = static_cast<int_type>(-written_exponent_overflow);
1172 exponent = static_cast<int_type>(written_exponent + exponent);
1178 exponent = static_cast<int_type>(exponent - 1);
1180 exponent = 0;
1183 if (exponent <= 0 && !is_zero) {
1194 while (exponent < 0 && !is_zero) {
1196 exponent = static_cast<int_type>(exponent + 1);
1202 exponent = 0;
1207 if (exponent > max_exponent) {
1208 exponent = max_exponent;
1217 static_cast<uint_type>(exponent << HF::exponent_left_shift) &