Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.Number.Types
Description
Definition of the continued fraction type
Documentation
Continued fraction type
Represents a simple continued fraction of the form:
Supports Haskell arithmetic operators though the use of the operator
function is to be preferred since provide shortcuts to calculations.
It can be an infinite sequence. Be careful with functions like show
and precision
: they may not terminate.
Cons operator
n :| x
equivalent to n
+ 1/x
Negate operator
M x
equivalent to -x