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

Fix cxx printing for Min/Max #20558

Merged
merged 5 commits into from Dec 10, 2020
Merged

Fix cxx printing for Min/Max #20558

merged 5 commits into from Dec 10, 2020

Conversation

FFroehlich
Copy link
Contributor

References to other Issues or PRs

Fixes #20557

Brief description of what is fixed or changed

Previous implementation used string conversion for first argument. Fixed correctly using using codeprinting

Other comments

Release Notes

  • printing
    • make cxxcode correctly print the first argument of Min/Max functions

@sympy-bot
Copy link

sympy-bot commented Dec 8, 2020

Hi, I am the SymPy bot (v161). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • printing
    • make cxxcode correctly print the first argument of Min/Max functions (#20558 by @FFroehlich)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.8.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
Fixes #20557 

#### Brief description of what is fixed or changed
Previous implementation used string conversion for first argument. Fixed correctly using using codeprinting

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* printing
  * make cxxcode correctly print the first argument of Min/Max functions
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@czgdp1807
Copy link
Member

Thanks for sending the fix @FFroehlich . If possible, could you please add a regression test for this fix?

Copy link
Member

@bjodah bjodah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for the patch. I concur, a test would be nice. Otherwise, +1 from me.

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #20558 (636474d) into master (425353e) will decrease coverage by 0.005%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master    #20558       +/-   ##
=============================================
- Coverage   75.742%   75.737%   -0.006%     
=============================================
  Files          673       673               
  Lines       174499    174499               
  Branches     41205     41205               
=============================================
- Hits        132170    132161        -9     
- Misses       36607     36611        +4     
- Partials      5722      5727        +5     

@FFroehlich
Copy link
Contributor Author

@bjodah @czgdp1807 added regression tests

@bjodah bjodah self-requested a review December 8, 2020 16:46
@czgdp1807
Copy link
Member

Tests are passing. Will merge tomorrow if no objections raised. Thanks for the contributions.

@czgdp1807 czgdp1807 merged commit 87d967e into sympy:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cxxcode doesn't translate nested Min/Max functions to std::calls
4 participants