rapidcheck icon indicating copy to clipboard operation
rapidcheck copied to clipboard

special values missing from arbitrary numeric generators

Open rnburn opened this issue 9 years ago • 1 comments

Generators like arbitrary are missing special numeric values. For example, this test runs fine

  rc::check("where are the special values?",
            []() {
              const auto x = *rc::gen::arbitrary<double>();
              RC_ASSERT(std::isfinite(x));
            });

I'd expect NaN, +-inf, and +-0 to be included in the generation. Also, I think it would be convenient to have something like a rc::gen::finite generator if you wanted to exclude NaN and infinity.

rnburn avatar Nov 14 '16 01:11 rnburn

I miss this one as well!

mjvankampen avatar Sep 29 '21 11:09 mjvankampen