fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

[BUG] Interval.isIntersection false positive on one-sided open intervals #323

Closed kevmal closed 2 months ago

kevmal commented 2 months ago

Interval.isIntersection returns true on adjacent open intervals (one sided) where it should be false. For example:


let i1 = Interval.CreateRightOpen(4,7)
let i2 = Interval.CreateLeftOpen(7,10)

Interval.isIntersection i1 i2
// returns true but would expect false
bvenn commented 2 months ago

Well spotted! 🚀