fact -package:arithmoi

A Fact p is an implicit proof of p, propagated by Haskell's constraint solver. Facts can be used to implicitly introduce or propagate proofs. However, there is a small run-time cost associated with using Facts: typeclass dictionaries for Facts are still passed around. In many cases they will be optimized away, but this is not guaranteed.
Factor the input DSum Event to produce an Event which fires when the DSum key changes and contains both the value of the DSum at switchover and an Event of values produced by subsequent firings of the input Event that do not change the DSum key.
Factor a 'Dynamic t DSum' into a Dynamic DSum containing nested Dynamic values. The outer Dynamic updates only when the key of the DSum changes, while the update of the inner Dynamic represents updates within the current key.
Compute the factorial function n!. Returns +∞ if the input is above 170 (above which the result cannot be represented by a 64-bit Double).
Returns a list of all prime factors; inverse of mconcat.
Exact factorial numbers. For a fast approximation see math-functions:Numeric.SpecFunctions.factorial instead. The naive definition of the factorial numbers is:
factorial n
| n < 0     = 0
| otherwise = product [1..n]
However, we use a fast algorithm based on the split-recursive form:
factorial n =
2^(n - popCount n) * product [(q k)^k | forall k, k >= 1]
where
q k = product [j | forall j, n*2^(-k) < j <= n*2^(-k+1), odd j]
Create a default factorization diagram for the given integer, by factoring it and calling factorDiagram' on its prime factorization (with the factors ordered from smallest to biggest).
import Diagrams.TwoD.Factorization
factorDiagramEx = factorDiagram 700
Create a centered factorization diagram from the given list of factors (intended to be primes, but again, any positive integers will do; note how the below example uses 6), by recursively folding according to primeLayout, with the defaultColors and a base case of a black circle.
import Diagrams.TwoD.Factorization
factorDiagram'Ex = factorDiagram' [2,5,6]
Not on Stackage, so not searched. Rational arithmetic in an irrational world.