@ -2,6 +2,8 @@ import math
from src.main.py.logarithmic_and_expo_and_root_calculations import potentiate
def pi_approx_leibniz(precision):
if precision < 0:
return -1
result = 0
for i in range(precision):
num = potentiate(-1, i)
@ -15,6 +15,9 @@ class MyTestCase(unittest.TestCase):
delta *= -1
self.assertLess(delta, 0.01)
def test_pi_precision_negative_10_should_be_negative_1_for_error(self):
self.assertEqual(pi_approx_leibniz(-10), -1)
def test_rad_2_to_deg_should_be_114_point_59(self):
delta = rad2deg(2) - 114.59
if delta < 0: