Implementations of special functions.