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

Copyright2014 Edward Kmett Charles Durham
2015 Trevor L. McDonell
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

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

Minimal complete definition

nearZero

Methods

nearZero :: Exp a -> Exp Bool Source #

Determine if a quantity is near zero.