Expanded math library, set types as per spec