Remove Java.Math library usage