Portability  nonportable (requires fenv.h) 

Stability  experimental 
Maintainer  mik@konecny.aow.cz 
Datatypes and abstractions for approximating exact real numbers and a basic arithmetic over such approximations. The design is inspired to some degree by Mueller's iRRAM and Lambov's RealLib (both are C++ libraries for exact real arithmetic).
Abstractions are provided via 4 type classes:

ERRealBase
: abstracts floating point numbers 
ERApprox
: abstracts neighbourhoods of real numbers 
ERIntApprox
: abstracts neighbourhoods of real numbers that are known to be intervals 
ERApproxElementary
: abstracts real number approximations that support elementary operations
For ERRealBase we give several implementations. The default is an arbitrary precision floating point type that uses Double for lower precisions and an Integerbased simulation for higher precisions. Rational numbers can be used as one of the alternatives. Augustsson's Data.Number.BigFloat can be easily wrapped as an instance of ERRealBase except that it uses a different method to control precision.
ERIntApprox is implemented via outwardsrounded arbitrary precision interval arithmetic. Any instance of ERRealBase can be used for the endpoints of the intervals.
ERApproxElementary is implemented generically for any implementation of ERIntApprox. This way some of the most common elementary operations are provided, notably: sqrt, exp, log, sin, cos, atan. These operations converge to an arbitrary precision and also work well over larger intervals without excessive wrapping.
There is also some support for generic Taylor series, interval Newton method and simple numerical integration.
 class (Fractional rb, Ord rb) => ERRealBase rb
 class (Fractional ra, Ord ra) => ERApprox ra
 class ERApprox ira => ERIntApprox ira
 class ERIntApprox ra => ERApproxElementary ra
 module Data.Number.ER.Real.DefaultRepr
 module Data.Number.ER.Real.Approx.Sequence
 module Data.Number.ER.Real.Arithmetic.Taylor
 module Data.Number.ER.Real.Arithmetic.Newton
 module Data.Number.ER.Real.Arithmetic.Integration
 module Data.Number.ER.BasicTypes
Documentation
class (Fractional rb, Ord rb) => ERRealBase rb Source
This class is an abstraction of a subset of real numbers with upwards rounded operations.
class (Fractional ra, Ord ra) => ERApprox ra Source
A type whose elements represent sets that can be used to approximate a single extended real number with arbitrary precision.
(ERRealBase b, RealFrac b) => ERApprox (ERInterval b) 
class ERApprox ira => ERIntApprox ira Source
A type whose elements represent sets that can be used to approximate a recursive set of closed extended real number intervals with arbitrary precision.
A type whose elements represent real *intervals* that can be used to approximate a single extended real number with arbitrary precision.
Sometimes, these types can be used to approximate a closed extended real number interval with arbitrary precision. Nevetheless, this is not guaranteed.
(ERRealBase b, RealFrac b) => ERIntApprox (ERInterval b) 
class ERIntApprox ra => ERApproxElementary ra Source
A class defining various common real number operations in a approximationaware fashion, ie introducing effort indices.
All operations here have default implementations based on Data.Number.ER.Real.Arithmetic.Elementary.
(ERRealBase b, RealFrac b) => ERApproxElementary (ERInterval b) 
module Data.Number.ER.BasicTypes