Safe Haskell | None |
---|---|
Language | Haskell98 |
- (+-) :: Rational -> Rational -> IReal
- (-+-) :: IReal -> IReal -> IReal
- lower :: IReal -> IReal
- rad :: IReal -> IReal
- mid :: IReal -> IReal
- upper :: IReal -> IReal
- hull :: [IReal] -> IReal
- containedIn :: IReal -> IReal -> Precision -> Bool
- intersection :: IReal -> IReal -> Maybe IReal
- toDouble :: IReal -> Double
- comp :: IReal -> IReal -> Ordering
- (=?=) :: IReal -> IReal -> Precision -> Bool
- (<!) :: IReal -> IReal -> Precision -> Bool
- (>!) :: IReal -> IReal -> Precision -> Bool
- showIReal :: Int -> IReal -> String
- (?) :: IReal -> Int -> IO ()
- (??) :: IReal -> Int -> IO ()
- force :: Int -> IReal -> IReal
- powerSeries :: (Num a1, Integral a, Enum a1) => (Integer -> a1 -> Integer) -> Integer -> (Int -> a) -> IReal -> IReal
- g0 :: IReal -> IReal
- ps :: (Integer -> Integer) -> Integer -> IReal
- halfPi :: IReal
- log2 :: IReal
- quarterPi :: IReal
Documentation
(+-) :: Rational -> Rational -> IReal infix 6 Source
Constructs an interval from midpoint and radius.
(-+-) :: IReal -> IReal -> IReal infix 6 Source
Constructs an interval from end points (which can be given in any order).
containedIn :: IReal -> IReal -> Precision -> Bool Source
Tests whether first arg is contained in second, using total tests of given precision.
intersection :: IReal -> IReal -> Maybe IReal Source
Intersection of intervals; empty intersection gives Nothing
(=?=) :: IReal -> IReal -> Precision -> Bool infix 3 Source
Total, approximate equality test. If x =?= y
returns atDecimals
dFalse
, then x
and y
are definitely not equal.
If it returns True
, then the absolute value of their difference is less than 10^(-d)
(but they may be non-equal).
(<!) :: IReal -> IReal -> Precision -> Bool infix 3 Source
Total, approximate inequality test. If x <! y
returns atDecimals
dTrue
, then x
is definitely smaller than y
,
If it returns False
, x
may still be smaller than y
, but their difference is then at most 10^(-d)
.
(?) :: IReal -> Int -> IO () infix 3 Source
Prints an IReal
with given number of decimals. Rounding error is up to one unit in the last position.
(??) :: IReal -> Int -> IO () infix 3 Source
Prints an IReal
in scientific notation with given number of digits. Rounding error is up to one unit in the last position.
force :: Int -> IReal -> IReal Source
Forces evaluation of second argument to given number of decimals; returns second argument.