Skip to content

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