From ec78eabd66b001754e89c10fd908122ac8bd7e89 Mon Sep 17 00:00:00 2001 From: PaddiM8 Date: Fri, 12 Jun 2020 21:16:47 +0200 Subject: [PATCH] Fixed exponent being one too much for scientific notation. --- kalk_cli/src/output.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalk_cli/src/output.rs b/kalk_cli/src/output.rs index 934286b..4dd31f3 100644 --- a/kalk_cli/src/output.rs +++ b/kalk_cli/src/output.rs @@ -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); }