certivl
Exact rational and certified interval arithmetic. A float comparison tells you what the hardware thought; an enclosure tells you what is true, because the answer is bracketed and the bracket is carried through every operation.
What it does
Exact rational and certified interval arithmetic. A float comparison tells you what the hardware thought; an enclosure tells you what is true, because the answer is bracketed and the bracket is carried through every operation.
pip install certivl
Why an interval rather than a number
A computed inequality is only evidence until the rounding is accounted for. An enclosure that stays strictly on one side of zero settles the question; one that straddles zero says the computation did not decide it. The second answer is the useful one, and floating point never gives it to you — it gives you a number and no idea how much of it is real.
Where it is used
Behind the certified bounds in the discrete-geometry papers: covering, packing and opacity results where a machine-checked upper bound has to survive someone re-running it on different hardware.
How it works
- Install it
pip install certivl. - Compute inside an enclosureEvery operation carries the bracket forward rather than collapsing to a number that has lost its error.
- Read the verdict, including 'undecided'An enclosure strictly on one side of zero settles the inequality. One that straddles zero says the computation did not decide it , which is the answer floating point never gives you.
What it gives you
Specifications
| Install | pip install certivl |
|---|---|
| Version | 0.2.0 |
| License | MIT |
| Arithmetic | Exact rational, certified interval |
| Source | vince-gonzalez/certivl |
Questions
- Why not just use floats carefully?
- Carefully is not a property you can check. An enclosure is.
- Is it slow?
- Slower than a float and faster than being wrong in a published bound.