ireal-0.1: Real numbers and intervals with not so inefficient exact arithmetic.

Safe HaskellNone
LanguageHaskell98

Data.Number.IReal.IReal

Synopsis

Documentation

newtype IReal Source

A real number/interval is a function from required precision to an integer interval; for numbers the interval is thin (has radius 1).

Constructors

IR (Precision -> IntegerInterval) 

Instances

Enum IReal 
Eq IReal

Equality test for overlapping values is non-terminating.

Floating IReal 
Fractional IReal

Division by zero is non-terminating.

Num IReal 
Ord IReal 
Real IReal 
RealFloat IReal 
RealFrac IReal 
Show IReal

IReal is an instance of Show but it should be avoided; see introduction. Use x ? n to print x with n decimals.

Powers IReal 
VarPrec IReal

prec n x is an interval of width 10^(-n) containing x.

Scalable IReal 
Arbitrary IReal 

ir :: (Precision -> IntegerInterval) -> IReal Source

Smart constructor; uses an (unfortunately unsafe) memoizing technique for efficiency.

appr :: IReal -> Precision -> IntegerInterval Source

Selector; computes integer interval for given precision.