General-purpose mathematical library