From 97b0fc2295adcdb1ba54e003227f486a92425acd Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 28 Jan 2017 21:36:49 -0800 Subject: switch to sci notation for floats (except latex) --- src/transpile_python.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/transpile_python.rs') diff --git a/src/transpile_python.rs b/src/transpile_python.rs index d980e60..f38f699 100644 --- a/src/transpile_python.rs +++ b/src/transpile_python.rs @@ -122,7 +122,7 @@ impl TranspilePython for Expr { use modelica_parser::BinOperator::*; match *self { Integer(e) => Ok(format!("{}", e)), - Float(e) => Ok(format!("{}", e)), + Float(e) => Ok(format!("{:e}", e)), Boolean(true) => Ok(format!("True")), Boolean(false) => Ok(format!("False")), StringLiteral(ref s) => Ok(format!("\"{}\"", s)), -- cgit v1.2.3