Implementation of math libraries.