From: Mark Thom Date: Thu, 18 Mar 2021 02:17:08 +0000 (-0600) Subject: print floating point zero as 0.0 (#859) X-Git-Tag: v0.9.0~120 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=69b1798af755a06f606010b0f27a871bdf9ec748;p=scryer-prolog.git print floating point zero as 0.0 (#859) --- diff --git a/src/heap_print.rs b/src/heap_print.rs index 52e0e2ae..3b2dce9d 100644 --- a/src/heap_print.rs +++ b/src/heap_print.rs @@ -963,8 +963,8 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> { match n { Number::Float(fl) => { if &fl == &OrderedFloat(0f64) { - push_space_if_amb!(self, "0", { - self.append_str("0"); + push_space_if_amb!(self, "0.0", { + self.append_str("0.0"); }); } else { let OrderedFloat(fl) = fl;