Positive infinity being returned for Arb.negativeFloat() and vice versa
See original GitHub issueI’m using io.kotest:kotest-property:5.0.2
on jvm
Maybe this isn’t a bug but it is unexpected. It appears that both positive and negative infinity are being returned in each of the Arb.negativeFloat()
etc generators.
When I run:
println("positiveFloat: ${Arb.positiveFloat().edgecases(10_000)}")
println("negativeFloat: ${Arb.negativeFloat().edgecases(10_000)}")
println("positiveDouble: ${Arb.positiveDouble().edgecases(10_000)}")
println("negativeDouble: ${Arb.negativeDouble().edgecases(10_000)}")
This is what I get:
positiveFloat: [3.4028235E38, Infinity, 1.0, NaN, 1.4E-45, -Infinity]
negativeFloat: [-3.4028235E38, -1.0, -Infinity, -1.4E-45, NaN, Infinity]
positiveDouble: [Infinity, 1.7976931348623157E308, NaN, 4.9E-324, 1.0, -Infinity]
negativeDouble: [NaN, Infinity, -1.7976931348623157E308, -4.9E-324, -1.0, -Infinity]
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Testing for positive infinity, or negative infinity, individually in ...
What's the pythonic way to test for them distinctly? Ways to test for positive infinity: x == float('+inf'); math.isinf(x) and x > 0....
Read more >std::numeric_limits<T>::infinity - cppreference.com
std::numeric_limits<T>::infinity ... Returns the special value "positive infinity", as represented by the floating-point type T . Only meaningful ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sksamuel I’ll look into this today
Will fix for 5.2.2