From 94be5d787f4865add651e05339273732d4f5d65b Mon Sep 17 00:00:00 2001 From: John Date: Thu, 19 Sep 2024 14:00:22 -0500 Subject: [PATCH] cl-ast: always pretty-print decimal for floats --- compiler/cl-ast/src/ast_impl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cl-ast/src/ast_impl.rs b/compiler/cl-ast/src/ast_impl.rs index 679a0bf..24f7aa6 100644 --- a/compiler/cl-ast/src/ast_impl.rs +++ b/compiler/cl-ast/src/ast_impl.rs @@ -50,7 +50,7 @@ mod display { Literal::Bool(v) => v.fmt(f), Literal::Char(v) => write!(f, "'{}'", v.escape_debug()), Literal::Int(v) => v.fmt(f), - Literal::Float(v) => f64::from_bits(*v).fmt(f), + Literal::Float(v) => write!(f, "{:?}", f64::from_bits(*v)), Literal::String(v) => write!(f, "\"{}\"", v.escape_debug()), } }