| Copyright | (c) 2011 Daniel Fischer 2017 Andrew Lelechenko |
|---|---|
| License | MIT |
| Maintainer | Andrew Lelechenko <andrew.lelechenko@gmail.com> |
| Stability | Provisional |
| Portability | Non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Math.NumberTheory.Moduli.Jacobi
Description
Jacobi symbol.
- data JacobiSymbol
- jacobi :: (Integral a, Bits a) => a -> a -> JacobiSymbol
- jacobi' :: (Integral a, Bits a) => a -> a -> JacobiSymbol
Documentation
jacobi :: (Integral a, Bits a) => a -> a -> JacobiSymbol #
Jacobi symbol of two numbers. The "denominator" must be odd and positive, this condition is checked.
If both numbers have a common prime factor, the result
is 0, otherwise it is ±1.
jacobi' :: (Integral a, Bits a) => a -> a -> JacobiSymbol #
Jacobi symbol of two numbers without validity check of the "denominator".