License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
sqrti :: Integer -> ( Integer , Integer ) Source #
sqrti
returns two integers
(l,b)
so that
l <= sqrt i <= b
.
The implementation is quite naive, use an approximation for the first number
and use a dichotomy algorithm to compute the bound relatively efficiently.