`math` function is faster than `numpy` function for scalar variables