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

Treating |x|<1 as a special case in floor(HighsCDouble x) and ceil(HighsCDouble x) #2043

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

jajhall
Copy link
Member

@jajhall jajhall commented Nov 18, 2024

This will close #2041

@fwesselm
Copy link
Contributor

I was wondering whether it would be worth implementing ceil using floor as follows:

friend HighsCDouble ceil(const HighsCDouble& x) { return -floor(-x); }

@jajhall
Copy link
Member Author

jajhall commented Nov 18, 2024

Ceil and floor are only a few lines of code, so it's more transparent to have them separate

@jajhall jajhall merged commit 4856a65 into latest Nov 18, 2024
248 checks passed
@jajhall jajhall deleted the fix-2041 branch November 18, 2024 15:41
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