From 5f3290f7a4128bcf8351c8c8ba5006eb56ad67e9 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 29 Aug 2011 18:27:52 +0200 Subject: [PATCH] bugfix: sign operator for compiled static file --- preprocessor/ExprNode.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc index 72ea4031d..262775c30 100644 --- a/preprocessor/ExprNode.cc +++ b/preprocessor/ExprNode.cc @@ -1638,7 +1638,7 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type, output << "abs"; break; case oSign: - if (output_type == oCDynamicModel) + if (output_type == oCDynamicModel || output_type == oCStaticModel) output << "copysign"; else output << "sign"; @@ -1713,7 +1713,7 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type, && arg->precedence(output_type, temporary_terms) < precedence(output_type, temporary_terms))) { output << LEFT_PAR(output_type); - if (op_code == oSign && output_type == oCDynamicModel) + if (op_code == oSign && (output_type == oCDynamicModel || output_type == oCStaticModel)) output << "1.0,"; close_parenthesis = true; }