fast-arithmetic-0.6.0.9: Fast functions on integers.

CopyrightCopyright (c) 2018 Vanessa McHale
Safe HaskellNone
LanguageHaskell2010

Numeric.NumberTheory

Description

This module provides fast number theoretic functions.

Synopsis

Documentation

totient :: Int -> Int Source #

Euler totient function.

tau :: Int -> Int Source #

Number of distinct divisors.

littleOmega :: Int -> Int Source #

Number of distinct prime factors

sumDivisors :: Int -> Int Source #

Sum of proper divisors. May overflow.

isPrime :: Int -> Bool Source #

\( O(\sqrt(n)) \)