Numeric.Geometric.Predicates.Interval
Description
These predicates use hardware (SSE) based interval arithmetic based on the algorithms presented in (1). They are intended to be used as a filter before resorting to slower exact computation.
- These routines return Nothing if the result could not be determined exactly from the calculated interval.
- Each call toggles the SSE rounding mode to -infinity and back.
- All computations are done in Double precision.
- Rewrite specializations are in place for Float and Double that greatly reduce allocations compared to Real. Using anything but Float or Double is probably absurdly slow thanks to realToFrac.
- For performance reasons we assume CDouble == Double.
- BRANIMIR LAMBOV. "INTERVAL ARITHMETIC USING SSE-2"
Documentation
cinttSSE :: Real a => a -> a -> a -> Maybe BoolSource
Test if p3 is within the closed interval specified by [p1,p2]