fix math::exp implementation