Copyright | (C) 2012 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Testing for values "near" zero
Documentation
class Num a => Epsilon a where Source
Provides a fairly subjective test to see if a quantity is near zero.
>>>
nearZero (1e-11 :: Double)
False
>>>
nearZero (1e-17 :: Double)
True
>>>
nearZero (1e-5 :: Float)
False
>>>
nearZero (1e-7 :: Float)
True
Epsilon Double |
|
Epsilon Float |
|
Epsilon CFloat |
|
Epsilon CDouble |
|
Epsilon a => Epsilon (V0 a) | |
Epsilon a => Epsilon (V1 a) | |
Epsilon a => Epsilon (V2 a) | |
Epsilon a => Epsilon (V3 a) | |
Epsilon a => Epsilon (V4 a) | |
Epsilon a => Epsilon (Plucker a) | |
(RealFloat a, Epsilon a) => Epsilon (Quaternion a) | |
Epsilon (f a) => Epsilon (Point f a) | |
(Dim k n, Epsilon a) => Epsilon (V k n a) |