{-# LANGUAGE ScopedTypeVariables #-} module Math.Epsilon ( epsilon ) where -------------------------------------------------------------------------------- {-# SPECIALISE epsilon :: Float #-} {-# SPECIALISE epsilon :: Double #-} epsilon :: forall r. RealFloat r => r epsilon = encodeFloat 1 ( 5 - floatDigits ( 0 :: r ) )