interval-arithmetic | algebraically closed interval system | Math library
kandi X-RAY | interval-arithmetic Summary
kandi X-RAY | interval-arithmetic Summary
An interval is a pair of numbers which represents all the numbers between them, closed means that the bounds are also included in the representation, extended real because the real number system is extended with two elements: -∞ and +∞ representing negative infinity and positive infinity respectively.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of interval-arithmetic
interval-arithmetic Key Features
interval-arithmetic Examples and Code Snippets
Community Discussions
Trending Discussions on interval-arithmetic
QUESTION
I would like to know if there exists a python interval arithmetic library with the following features:
If x and y are both intervals, eg: [1.2,2.1], [3.8,9.9], then their sum/product/ratio is an interval, and in particular, any real number in the first interval plus/times/over the a real number in the second interval, will be contained in the resulting interval.
In particular, I would like to know of such a library that does this and accounts for floating point error so that the results can be used in mathematical proofs. I have found some libraries such as this one: https://pythonhosted.org/uncertainties/ that account for error on real numbers, however they don't do so in this stricter sense that I require.
Thanks to TimPeters for suggesting this library:
https://mpmath.org/doc/current/contexts.html#arbitrary-precision-interval-arithmetic-iv
I think this should be the correct tool to use.
...ANSWER
Answered 2021-Nov-09 at 21:19As suggested in comments, the OP appeared to be happy with the basic interval arithmetic facilities (binary floating point, with user-settable precision, emulated in software) supplied by the widely used mpmath
extension library.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install interval-arithmetic
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page