linear-1.20.8: 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

Minimal complete definition

nearZero

Methods

nearZero :: a -> Bool Source #

Determine if a quantity is near zero.

Instances
 Source # abs a <= 1e-12 Instance detailsDefined in Linear.Epsilon Methods Source # abs a <= 1e-6 Instance detailsDefined in Linear.Epsilon Methods Source # abs a <= 1e-6 Instance detailsDefined in Linear.Epsilon Methods Source # abs a <= 1e-12 Instance detailsDefined in Linear.Epsilon Methods (Epsilon a, RealFloat a) => Epsilon (Complex a) Source # Instance detailsDefined in Linear.Epsilon Methods Epsilon a => Epsilon (V1 a) Source # Instance detailsDefined in Linear.V1 MethodsnearZero :: V1 a -> Bool Source # Epsilon a => Epsilon (V2 a) Source # Instance detailsDefined in Linear.V2 MethodsnearZero :: V2 a -> Bool Source # Epsilon a => Epsilon (V3 a) Source # Instance detailsDefined in Linear.V3 MethodsnearZero :: V3 a -> Bool Source # Epsilon a => Epsilon (V4 a) Source # Instance detailsDefined in Linear.V4 MethodsnearZero :: V4 a -> Bool Source # Epsilon (V0 a) Source # Instance detailsDefined in Linear.V0 MethodsnearZero :: V0 a -> Bool Source # (RealFloat a, Epsilon a) => Epsilon (Quaternion a) Source # Instance detailsDefined in Linear.Quaternion Methods Epsilon a => Epsilon (Plucker a) Source # Instance detailsDefined in Linear.Plucker Methods Epsilon (f a) => Epsilon (Point f a) Source # Instance detailsDefined in Linear.Affine MethodsnearZero :: Point f a -> Bool Source # (Dim n, Epsilon a) => Epsilon (V n a) Source # Instance detailsDefined in Linear.V MethodsnearZero :: V n a -> Bool Source #