linear-1.3.1: Linear Algebra

Portability portable provisional Edward Kmett Safe-Inferred

Linear.Epsilon

Description

Testing for values near zero

Synopsis

# Documentation

class Num a => Epsilon a whereSource

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 -> BoolSource

Determine if a quantity is near zero.

Instances

 Epsilon Double ``abs` a `<=` 1e-12` Epsilon Float ``abs` a `<=` 1e-6` Epsilon CFloat ``abs` a `<=` 1e-6` Epsilon CDouble ``abs` a `<=` 1e-12` 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) (Dim n, Epsilon a) => Epsilon (V n a) Epsilon (f a) => Epsilon (Point f a)