ireal-0.2.3: Real numbers and intervals with relatively efficient exact arithmetic.
Data.Number.IReal.Scalable
Synopsis
class Scalable a where Source
Scaling. scale x n computes x * 2^n using bit shifts.
scale x n
x * 2^n
Methods
scale :: a -> Int -> a Source
Instances
Correctly rounded result for negative n. Rounds upwards when decimal part of unrounded result is .5
class VarPrec a where Source
Minimal complete definition
precB
prec :: Int -> a -> a Source
precB :: Int -> a -> a Source
prec n x is an interval of width at least 10^(-n) containing x.