Skip to content

Upstream float support for inRange - #347

Open
martin4861 wants to merge 2 commits into
emil-e:masterfrom
martin4861:upstream-float-support
Open

Upstream float support for inRange#347
martin4861 wants to merge 2 commits into
emil-e:masterfrom
martin4861:upstream-float-support

Conversation

@martin4861

@martin4861 martin4861 commented Aug 6, 2026

Copy link
Copy Markdown

Upstreaming our patches for float support:

  • Split inRange into an overloaded function for floating values in Numeric.hpp. Floating values cannot use an integer modulo.
  • Add float specialization to TowardsSeq in Shrink.hpp. The integral version of TowardsSeq uses std::make_unsigned, which is unavailable for floating values.
  • Add tests

I tested with gcc-11 (therefore I had to temporarily update ext/catch to v2.13.10)

@martin4861
martin4861 force-pushed the upstream-float-support branch from b72e140 to 39ba1cf Compare August 6, 2026 09:04
@martin4861
martin4861 force-pushed the upstream-float-support branch from 7b0f806 to f9302e2 Compare August 6, 2026 09:13
@martin4861 martin4861 changed the title Upstream float support Upstream float support for inRange Aug 6, 2026
@martin4861
martin4861 marked this pull request as ready for review August 6, 2026 10:56
@martin4861

Copy link
Copy Markdown
Author

@emil-e would you be able to perform a review of this PR? Thanks a lot in advance!

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.

1 participant