HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecrypton-1.0.4Haskell2010

Crypto.Number.Basic

  • 7 values
  • Packagecrypton-1.0.4
  • 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.