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 constexpr cmath floor of 1 returning 0 #1232 #1233

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

yousseflakhal
Copy link
Contributor

Problem

The boost::math::ccmath::floor function incorrectly returns 0.0 for 1.0 in a constexpr context.

Solution

  • Fixed the implementation to correctly handle 1.0.
  • Added test cases in ccmath_floor_test.cpp.

Linked Issue

Fixes #1232

@ckormanyos
Copy link
Member

Thanks for pressing on with this.

I just approved this workflow run. We must approve workflow runs for first-time contributions @yousseflakhal.

Let's let this thing run through CI now.

Cc: @mborland and @jzmaddock

Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

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

LGTM Thanks!

@mborland mborland merged commit 933faf4 into boostorg:develop Jan 13, 2025
77 of 78 checks passed
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.

Constexpr cmath floor of 1 is returning 0
3 participants