HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Modulecryptonite-0.30Haskell2010

Crypto.Number.Basic

Synopsis
  • Packagecryptonite-0.30
  • Exports7
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBasic.hs
valuesqrti :: Integer -> (Integer, Integer)

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.