linear-1.19.1.3: Linear Algebra

Linear.Epsilon

Description

Testing for values "near" zero

Synopsis

# 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
```

Methods

nearZero :: a -> Bool Source

Determine if a quantity is near zero.

Instances

 Epsilon Double Source ``abs` a `<=` 1e-12` Epsilon Float Source ``abs` a `<=` 1e-6` Epsilon CFloat Source ``abs` a `<=` 1e-6` Epsilon CDouble Source ``abs` a `<=` 1e-12` Epsilon a => Epsilon (V0 a) Source Epsilon a => Epsilon (V1 a) Source Epsilon a => Epsilon (V2 a) Source Epsilon a => Epsilon (V3 a) Source Epsilon a => Epsilon (V4 a) Source Epsilon a => Epsilon (Plucker a) Source (RealFloat a, Epsilon a) => Epsilon (Quaternion a) Source Epsilon (f a) => Epsilon (Point f a) Source (Dim k n, Epsilon a) => Epsilon (V k n a) Source