OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

python interval arithmetic library

  • Thread starter Thread starter Mathew
  • Start date Start date
M

Mathew

Guest
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.
<p>I would like to know if there exists a python interval arithmetic library with the following features:</p>
<p>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.</p>
<p>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: <a href="https://pythonhosted.org/uncertainties/" rel="nofollow noreferrer">https://pythonhosted.org/uncertainties/</a> that account for error on real numbers, however they don't do so in this stricter sense that I require.</p>
<p>Thanks to TimPeters for suggesting this library:<br />
<a href="https://mpmath.org/doc/current/contexts.html#arbitrary-precision-interval-arithmetic-iv" rel="nofollow noreferrer">https://mpmath.org/doc/current/contexts.html#arbitrary-precision-interval-arithmetic-iv</a></p>
<p>I think this should be the correct tool to use.</p>
 

Latest posts

Top