BiobaseTypes-0.1.1.1: Collection of types for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Biobase.Types.NumericalExtremes

Description

For some values, we want to have different kind of extreme values. Consider a Double representing an energy. We want near infinities that do not lead to numeric problems.

TODO benchmark different extremes and their interplay with algebraic operations.

TODO consider the ieee754 package

Synopsis

Documentation

class NumericalExtremes x where Source

Very large and small numbers with some numerical safety to 1/0 or maxBound (depending on if we are Integral or RealFloat.

We have:

maxFinite >= extremelyLarge >= veryLarge
veryLarge >= verySmall

verySmall >= extremelySmall >= minFinite.

TODO the small stuff should actually be around zero, but positive and go into NumericalEpsilon. Here we should actually use other names.

Methods

maxFinite :: x Source

Largest finite number

minFinite :: x Source

Smallest finite number

veryLarge :: x Source

Around 1/100 of the largest finite number

verySmall :: x Source

Around 1/100 of the smallest finite number

extremelyLarge :: x Source

Around 1/ 10 of the largest finite number

extremelySmall :: x Source

Around 1/ 10 of the smallest finite number

class NumericalEpsilon x where Source

Small numbers.

Methods

epsilon :: x Source

Smallest positive number /= 0.0.