Fixed exponent being one too much for scientific notation.

This commit is contained in:
PaddiM8 2020-06-12 21:16:47 +02:00
parent 039f79697d
commit ec78eabd66

View File

@ -28,7 +28,7 @@ pub fn eval(parser: &mut parser::Context, input: &str) {
};
if use_sci_notation {
println!("{}{}*10^{}", sign, num, exp);
println!("{}{}*10^{}", sign, num, exp - 1);
} else {
println!("{}{}", sign, num);
}