floating-bits-0.3.1.0: Bitwise accurate floating point conversion, and Unit of Lease Precision calculation.
Copyright(C) 2015 Anselm Jonas Scholl (C) 2023 Julia Longtin
LicenseBSD3
MaintainerJulia Longtin <Julia.longtin@gmail.com>
Stabilityexperimental
PortabilityGHC-specific
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Bits.Floating.Ulp

Description

Provides increment-by-ulp, decrement-by-ulp, and get-ulp functions for Doubles, and Floats.

Synopsis

Documentation

doubleNextUlp :: Double -> Double Source #

Advance a Double by one ULP.

doublePrevUlp :: Double -> Double Source #

Subtract one ULP from a Double.

doubleUlp :: Double -> Double Source #

Return the distance to the next floating point number.

floatNextUlp :: Float -> Float Source #

Advance a Float by one ULP.

floatPrevUlp :: Float -> Float Source #

Subtract one ULP from a Float.

floatUlp :: Float -> Float Source #

Return the distance to the next floating point number.