Python Library for generalized interval arithmetic.
An interval arithmetic that allows inverted intervals
- Kaucher intervals,
- generalized intervals,
- directed intervals
- modal intervals.
The library implements a few unary and binary functions, print-time outward- and inward-directed rounding. In contrast, the KaucherPy library by Maraschin et al. does not implement trigonometric functions, and it handles rounding incorrectly.
See kboxes.py for the library codes of Kaucher based on generalised Kaucher intervals. Several Jupyter notebooks files stored in the example directory illustrates features one certain topic per file. Examples include:
- Basic introduction of Kaucher intervals
- Semantic intepretation of Kaucher interval calculations
- Directed rounding
- Back calculation
- Interpretation of significant digits
The library can be installed locally in the development mode as it has not been registered in PyPI yet.
$ pip install kaucher -e .from kaucher import Kaucher as K
import kaucher as k
# backcalculation
A = K(4, 5)
C = K(10, 15)
B = C - A.dual()
# envelope
k.env(K(3, 1), K(2, 4), K(0, 7))
# imposition
k.imp(K(3, 1), K(2, 4))kaucher_pbox was created by Scott Ferson and maintained by Leslie Yu Chen. It is licensed under the terms of the MIT license.