taschini / pyinterval

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

Raising interval to power zero should always give one #22

Open andrewburbanks opened 6 years ago

andrewburbanks commented 6 years ago

Raising an interval X to the integer power zero should give the interval [1, 1] provided that X is not empty, even if X contains zero. However, the current version delivers [0, 1] if X contains zero.

Example:

interval[0]**0 interval([0.0, 1.0])

taschini commented 6 years ago

You're right. I'll fix that as soon as I have a little time.