Copyied parts of a personal Math library.