From 985d74238170a06509c7239ba1df48b0d645ff6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Mon, 27 Jan 2020 16:40:25 +0100 Subject: [PATCH] Removed prefixing of doubles between -1 and 1 with 0. This resulted in values like `00.018` in the AST's NumConstNode which cannot be read by some JSON readers (e.g. Mathworks' jsondecode). --- src/ExprNode.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ExprNode.cc b/src/ExprNode.cc index b8eec32d..42787045 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -451,8 +451,6 @@ void NumConstNode::writeJsonAST(ostream &output) const { output << R"({"node_type" : "NumConstNode", "value" : )"; - if (double testval = datatree.num_constants.getDouble(id); testval < 1.0 && testval > -1.0 && testval != 0.0) - output << "0"; output << datatree.num_constants.get(id) << "}"; }