Math library migration from the SGE Engine