Added documentation #730

Merged
zxq9 merged 18 commits from github/fork/radrow/doc-revolution into lima 2020-03-10 20:39:40 +09:00
Showing only changes of commit 78575cf985 - Show all commits

View File

@ -1635,9 +1635,15 @@ The described below functions take care of normalization of the fractions
they won't grow if it is unnecessary. Please note that the size of `frac` can be still they won't grow if it is unnecessary. Please note that the size of `frac` can be still
very big while the value is actually very close to a natural number the division of very big while the value is actually very close to a natural number the division of
two extremely big prime numbers *will* be as big as both of them. To face this issue two extremely big prime numbers *will* be as big as both of them. To face this issue
the [optimize](#optimize) function is provided. It will approximate the value of the the [optimize](#optimize** function is provided. It will approximate the value of the
fraction to fit in the given error margin and to shrink its size as much as possible. fraction to fit in the given error margin and to shrink its size as much as possible.
**Important note:** `frac` must *not* be compared using standard `<`-like operators.
The operator comparison is not possible to overload at this moment, nor the
language provides checkers to prevent unintended usage of them. Therefore the typechecker
**will** allow that and the results of such comparison will be unspecified.
You should use [lt](#lt), [geq](#geq), [eq](#eq) etc instead.
### make_frac ### make_frac
`Frac.make_frac(n : int, d : int) : frac` `Frac.make_frac(n : int, d : int) : frac`