Frac doc comparison warning

This commit is contained in:
radrow 2020-02-27 16:05:02 +01:00
parent 3dcd462a3a
commit 78575cf985

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`