bugfix: sign operator for compiled static file
parent
cf7d1723f4
commit
5f3290f7a4
|
@ -1638,7 +1638,7 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
output << "abs";
|
output << "abs";
|
||||||
break;
|
break;
|
||||||
case oSign:
|
case oSign:
|
||||||
if (output_type == oCDynamicModel)
|
if (output_type == oCDynamicModel || output_type == oCStaticModel)
|
||||||
output << "copysign";
|
output << "copysign";
|
||||||
else
|
else
|
||||||
output << "sign";
|
output << "sign";
|
||||||
|
@ -1713,7 +1713,7 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
&& arg->precedence(output_type, temporary_terms) < precedence(output_type, temporary_terms)))
|
&& arg->precedence(output_type, temporary_terms) < precedence(output_type, temporary_terms)))
|
||||||
{
|
{
|
||||||
output << LEFT_PAR(output_type);
|
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,";
|
output << "1.0,";
|
||||||
close_parenthesis = true;
|
close_parenthesis = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue