Skip to content

Resolve error parenthesizing pow mantissa#3472

Merged
blnicho merged 3 commits intoPyomo:mainfrom
jsiirola:pow-pprint
Feb 12, 2025
Merged

Resolve error parenthesizing pow mantissa#3472
blnicho merged 3 commits intoPyomo:mainfrom
jsiirola:pow-pprint

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes #3471 .

Summary/Motivation:

This resolves a logic error in the expression to string visitor where we did not correctly interpret negative constants as "neg(const)" when determining if we needed to parenthesize infix expressions.

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@blnicho blnicho merged commit 85c0035 into Pyomo:main Feb 12, 2025
29 checks passed
@jsiirola jsiirola deleted the pow-pprint branch March 24, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

String conversion of Expression not correct

3 participants