Lines Matching defs:exponent
19 /// Parse the significant digits and biased, binary exponent of a float.
57 // 1. An algorithm with a finite number of digits and a positive exponent.
58 // 2. An algorithm with a finite number of digits and a negative exponent.
60 let exponent = sci_exp + 1 - digits as i32;
61 if exponent >= 0 {
62 positive_digit_comp::<F>(bigmant, exponent)
64 negative_digit_comp::<F>(bigmant, fp, exponent)
68 /// Generate the significant digits with a positive exponent relative to mantissa.
69 pub fn positive_digit_comp<F: Float>(mut bigmant: Bigint, exponent: i32) -> ExtendedFloat {
71 // Now, we can calculate the mantissa and the exponent from this.
72 // The binary exponent is the binary exponent for the mantissa
74 bigmant.pow(10, exponent as u32).unwrap();
95 /// Generate the significant digits with a negative exponent relative to mantissa.
99 /// exponent. We then calculate the theoretical representation of `b+h`, which
101 /// exponent. If we had infinite, efficient floating precision, this would be
119 exponent: i32,
125 // Get the significant digits and radix exponent for the real digits.
127 let real_exp = exponent;
135 // Get the significant digits and the binary exponent for `b+h`.
364 /// Calculate the scientific exponent from a `Number` value.
370 let mut exponent = num.exponent;
373 exponent += 4;
377 exponent += 2;
381 exponent += 1;
383 exponent as i32
391 exp: float.exponent(),