ekmett / intervals

Interval Arithmetic
http://hackage.haskell.org/package/intervals
BSD 2-Clause "Simplified" License
27 stars 13 forks source link

Added measure of distance between intervals. #17

Closed dmcclean closed 10 years ago

dmcclean commented 10 years ago

This is what I was trying to do in the first place that led me to the issue with the old mignitude definition.

I'm not sure if it is of enough general interest to justify being here. But given the that I got it subtly wrong twice it might be.

I didn't add the same method to the empty of Kaucher variants because I wasn't sure how to handle one or both of the operands being Empty, or whether the directed definition had to be different somehow.

ekmett commented 10 years ago

I think if we just went with the obvious mignitude of the difference for the Kaucher version we'd be okay.

dmcclean commented 10 years ago

That's probably true, but we haven't changed the mignitude definition in Kaucher yet either, it still has the previous semantics. (Minimum absolute value of endpoint, instead of minimum absolute value in the interval.)

ekmett commented 10 years ago

ah that'd be a bug then. =)

ekmett commented 10 years ago

Fixed.