Real

Real numbers. The Haskell report defines no laws for Real, however Real instances are customarily expected to adhere to the following law: The law does not hold for Float, Double, CFloat, CDouble, etc., because these types contain non-finite values, which cannot be roundtripped through Rational.
The types Ratio and Rational, and the classes Real, Fractional, Integral, and RealFrac.
Real numbers. The Haskell report defines no laws for Real, however Real instances are customarily expected to adhere to the following law:
match postings with this "realness" value
The types Ratio and Rational, and the classes Real, Fractional, Integral, and RealFrac.
Supporting code for handling Fortran REAL literals. Fortran REAL literals have some idiosyncrasies that prevent them from lining up with Haskell's reals immediately. So, we parse into an intermediate data type that can be easily exported with full precision later. Things we do:
  • Strip explicit positive signs so that signed values either begin with the minus sign - or no sign. (Read doesn't allow explicit positive signs.)
  • Make exponent explicit by adding the default exponent E0 if not present.
  • Make implicit zeroes explicit. .123 -> 0.123, 123. -> 123.0. (Again, Haskell literals do not support this.)
For example, the Fortran REAL literal 1D0 will be parsed into 1.0D0.
Exact real numbers represented by Cauchy sequences of MPBalls.