linear-accelerate-0.7.0.0: Lifting linear vector spaces into Accelerate

Copyright2014 Edward Kmett Charles Durham
[2015..2020] Trevor L. McDonell
LicenseBSD-style (see the file LICENSE)
MaintainerTrevor L. McDonell <trevor.mcdonell@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.Linear.Epsilon

Description

Free metric spaces

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 :: Exp Double)
(0, ())
>>> nearZero (1e-17 :: Exp Double)
(1, ())
>>> nearZero (1e-5 :: Exp Float)
(0, ())
>>> nearZero (1e-7 :: Exp Float)
(1, ())

Methods

nearZero :: Exp a -> Exp Bool Source #

Determine if a quantity is near zero.

Instances
Epsilon Double Source #
abs a <= 1e-12
Instance details

Defined in Data.Array.Accelerate.Linear.Epsilon

Epsilon Float Source #
abs a <= 1e-6
Instance details

Defined in Data.Array.Accelerate.Linear.Epsilon

Epsilon CDouble Source #
abs a <= 1e-12
Instance details

Defined in Data.Array.Accelerate.Linear.Epsilon

Epsilon CFloat Source #
abs a <= 1e-6
Instance details

Defined in Data.Array.Accelerate.Linear.Epsilon

Epsilon a => Epsilon (Plucker a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.Plucker

Methods

nearZero :: Exp (Plucker a) -> Exp Bool Source #

(RealFloat a, Epsilon a) => Epsilon (Quaternion a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.Quaternion

Epsilon a => Epsilon (V4 a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.V4

Methods

nearZero :: Exp (V4 a) -> Exp Bool Source #

Epsilon a => Epsilon (V3 a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.V3

Methods

nearZero :: Exp (V3 a) -> Exp Bool Source #

Epsilon a => Epsilon (V2 a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.V2

Methods

nearZero :: Exp (V2 a) -> Exp Bool Source #

Epsilon a => Epsilon (V1 a) Source # 
Instance details

Defined in Data.Array.Accelerate.Linear.V1

Methods

nearZero :: Exp (V1 a) -> Exp Bool Source #