metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.43k stars 204 forks source link

Improve range of :< :> pos? neg? generators #1030

Closed frenchy64 closed 2 months ago

frenchy64 commented 3 months ago

I don't think :max-tries is needed here because such-that will increase the size on failures which AFAICT reliably makes gen/double* choose a different value.

frenchy64 commented 2 months ago

I need to check how this affects shrinking.

frenchy64 commented 2 months ago

Maybe something like this is more appropriate, I think the extra such-that balloons the minimum shrunk size: https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#nextAfter(double,%20double)

Not sure about cljs.