arithmoi-0.6.0.1: Efficient basic number-theoretic functions.

Copyright (c) 2011 Daniel Fischer 2017 Andrew Lelechenko MIT Andrew Lelechenko Provisional Non-portable (GHC extensions) None Haskell2010

Math.NumberTheory.Moduli.Jacobi

Description

Jacobi symbol.

Synopsis

# Documentation

Type for result of jacobi.

Constructors

 MinusOne Zero One

Instances

 Source # Methods Source # Methods Source # MethodsshowList :: [JacobiSymbol] -> ShowS # Source # Methodsstimes :: Integral b => b -> JacobiSymbol -> JacobiSymbol # Source # Methodsmconcat :: [JacobiSymbol] -> JacobiSymbol #

jacobi :: (Integral a, Bits a) => a -> a -> JacobiSymbol Source #

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 Source #

Jacobi symbol of two numbers without validity check of the "denominator".