[Python] python interval arithmetic library [closed]

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    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.

    Continue reading...

Compartilhe esta Página