diff --git a/src/main/py/trigonometry.py b/src/main/py/trigonometry.py index ae1aeb8..282137b 100644 --- a/src/main/py/trigonometry.py +++ b/src/main/py/trigonometry.py @@ -15,6 +15,12 @@ def rad2deg(radNumber): return (radNumber * 180) / math.pi def sin_approx_bhaskara(radNumber): - num = 16 * radNumber * (math.pi - radNumber) - denom = 5 * math.pow(math.pi, 2) - 4 * radNumber * (math.pi - radNumber) - return num/denom \ No newline at end of file + num = multiply(16, radNumber) + num = multiply(num, subract(radNumber, math.pi)) + + denomFrag1 = multiply(5, math.pow(math.pi, 2)) + denomFrag2 = subract(radNumber, math.pi) + denomFrag2 = multiply(denomFrag2, radNumber) + denomFrag2 = multiply(denomFrag2, 4) + + return divide(num, subract(denomFrag2, denomFrag1)) \ No newline at end of file