Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep operand order when removing parens around + and - operators #406

Merged
merged 6 commits into from
May 24, 2024

Conversation

laurentlb
Copy link
Owner

@laurentlb laurentlb commented May 24, 2024

Followup to #151

This transformation preserves the order of the operands (x, y, z), but it changes the order of evaluation of the operators. This should be fine for + and -.

For the multiplication: we preserve the evaluation order of the multiplications (because of float precision), but we swap the operands only when it's pure.

@laurentlb laurentlb merged commit 22a118b into master May 24, 2024
1 check passed
@laurentlb laurentlb deleted the define branch May 24, 2024 23:45
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.

2 participants