CrossHair icon indicating copy to clipboard operation
CrossHair copied to clipboard

Cover example differs

Open isidroas opened this issue 1 year ago • 2 comments

When doing the example of https://crosshair.readthedocs.io/en/latest/cover.html , I noticed that the result is different:

$ crosshair cover foo.py
average([0.0], default=float("inf"))

To get the same results I had to increase the iterations:

$ crosshair cover --max_uninteresting_iterations 15 foo.py
average([0.0], default=float("inf"))
average([], default=0.0)

$ crosshair cover --max_uninteresting_iterations 19 foo.py
average([0.0], default=float("inf"))
average([], default=0.0)
average([], default=None)

offtopic: Thank you for this very curious library!

isidroas avatar Nov 02 '24 11:11 isidroas

Ah, yes, as of recently, CrossHair attempts true floating point semantics. That's good, but it's made this example take longer. I'll update the example soon. (or maybe tweak the heuristics)

offtopic: Thank you for this very curious library!

😊 If you end up trying it out, I would love to hear more about what works well for you, and what doesn't!

pschanely avatar Nov 04 '24 13:11 pschanely

Update: I am delaying a documentation fix for this slightly, under the hope that one of my unrelated arcs of work makes it not necessary. 😄

pschanely avatar Nov 13 '24 23:11 pschanely