taschini / pyinterval

PyInterval — Interval arithmetic in Python
http://pyinterval.readthedocs.io
Other
83 stars 25 forks source link

Intervals for arbitrary comparable values #21

Open AlexandreDecan opened 6 years ago

AlexandreDecan commented 6 years ago

Hello,

First of all, thank you for pyinterval!

This post is not really an issue but could be considered as an "ads", sorry for that ;-) Some days ago, I was looking for a Python library providing interval arithmetic. A well-known search engine suggested pyinterval, but it seems that pyinterval is "restricted" to real numbers, and I was looking for a library that supports arbitrary objects (in short: I wanted to create and manipulate intervals of software versions).

Given I haven't found any maintained/stable/correct alternative, I decided to implement my own library that supports interval arithmetic for arbitrary comparable objects in Python. As I think I'm not the only one who found pyinterval by looking for a library that supports arbitrary objects, having a pointer to "alternative" libraries like mine could be interesting.

The library can be found at https://github.com/AlexandreDecan/python-intervals or on PyPI (package name is "python-intervals". Yeah, I known, that's not very imaginative ;-))

taschini commented 6 years ago

Thanks for the link.

My library is pretty much focused on numerical computations with correct rounding, hence the restriction to floats.

There is plenty of space for other libraries that implement interval libraries on types that are not affected by rounding issues.

AlexandreDecan commented 6 years ago

Yes, but I was quite surprised to see that there was no library with similar quality than pyinterval but for arbitrary objects :)