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

Use _string_round when printing sets #3341

Merged
merged 6 commits into from
May 4, 2023
Merged

Use _string_round when printing sets #3341

merged 6 commits into from
May 4, 2023

Conversation

odow
Copy link
Member

@odow odow commented May 3, 2023

Closes #3339

I don't know about this. If we're thinking of supporting arbitrary number types in JuMP, I'd lean the other way, and remove the rounding when printing?

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.12 🎉

Comparison is base (e87f315) 97.92% compared to head (0e059f9) 98.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3341      +/-   ##
==========================================
+ Coverage   97.92%   98.05%   +0.12%     
==========================================
  Files          34       34              
  Lines        4874     4876       +2     
==========================================
+ Hits         4773     4781       +8     
+ Misses        101       95       -6     
Impacted Files Coverage Δ
src/print.jl 99.73% <100.00%> (+0.26%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

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

I'm in favor of this. In the future, we can have printing options and make it optional but I would round by default. Even if power users might be interested to see that these are floating point numbers, most users like the abstraction and prefer to thing about math instead of having to worry about technical details.

@odow
Copy link
Member Author

odow commented May 3, 2023

I guess we can aways revisit when we add generic number support.

@odow odow merged commit adad825 into master May 4, 2023
@odow odow deleted the od/print-round branch May 4, 2023 00:45
@blegat blegat mentioned this pull request May 22, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Rounding constant in printing
2 participants