Fix comment

[skip ci]
master
Sébastien Villemot 2022-07-27 16:50:08 +02:00
parent c3cb7ca534
commit fc4c9a73c9
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 6 additions and 6 deletions

View File

@ -4510,10 +4510,10 @@ BinaryOpNode::writeJsonOutput(ostream &output,
close_parenthesis = false;
/* Add parenthesis around right argument if:
- its precedence is lower than those of the current node
- its precedence is lower than that of the current node
- it is a power operator and current operator is also a power operator
- it is a minus operator with same precedence than current operator
- it is a divide operator with same precedence than current operator */
- it has same precedence as current operator and current operator is
either a minus or a divide */
auto barg2 = dynamic_cast<BinaryOpNode *>(arg2);
if (int arg2_prec = arg2->precedenceJson(temporary_terms); arg2_prec < prec
|| (op_code == BinaryOpcode::power && barg2 && barg2->op_code == BinaryOpcode::power)
@ -4723,10 +4723,10 @@ BinaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
else
{
/* Add parenthesis around right argument if:
- its precedence is lower than those of the current node
- its precedence is lower than that of the current node
- it is a power operator and current operator is also a power operator
- it is a minus operator with same precedence than current operator
- it is a divide operator with same precedence than current operator */
- it has same precedence as current operator and current operator is
either a minus or a divide */
auto barg2 = dynamic_cast<BinaryOpNode *>(arg2);
if (int arg2_prec = arg2->precedence(output_type, temporary_terms); arg2_prec < prec
|| (op_code == BinaryOpcode::power && barg2 && barg2->op_code == BinaryOpcode::power && !isLatexOutput(output_type))