Skip to content

Constructor of interval that contains number not represented exactly by IEEE 754 #20

Description

@markcampanelli

Thanks for making this interval package available publicly. I have found it useful for making "gold" datasets for verifying and benchmarking competing numerical algorithms to solve the same problem.

I would like to pyinterval to have a constructor that will return the smallest interval (with exact IEEE 754 endpoints) that contains a number passed in as an "exact" decimal representation as a string.

For example,

x = interval('0.1')

would return the smallest interval (with exact IEEE 754 endpoints) containing 0.1.

Also, it would be very helpful to be able to turn on a "full precision" mode that shows all interval endpoints at full (decimal) precision. A hexidecimal option here would make things more compact as well (cf. https://docs.python.org/3/library/functions.html#hex).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions