Math.Stimes
Description
Prime number enumeration and prime factorization.
stimes' :: Semigroup a => Int -> a -> a #
\(O(W)\) Strict, much faster stimes.
stimes
stimesOr' :: Semigroup a => a -> Int -> a -> a #
mtimes' :: Monoid a => Int -> a -> a #
\(O(W)\) Strict, much faster mtimes.
mtimes
power :: Int -> (a -> a -> a) -> a -> a #
\(O(W)\) Calculates s^n by n (N > 0) times using the binary lifting technique.
s^n
n
powerOr :: a -> Int -> (a -> a -> a) -> a -> a #
powerMay :: Int -> (a -> a -> a) -> a -> Maybe a #
\(O(W)\) Multiplies x by n@ times using the binary lifting technique.
x by