fix and modify the math equation in 'divide'