diff --git a/src/main/py/logarithmic_and_expo_and_root_calculations.py b/src/main/py/logarithmic_and_expo_and_root_calculations.py index b4606f2..dc181e1 100644 --- a/src/main/py/logarithmic_and_expo_and_root_calculations.py +++ b/src/main/py/logarithmic_and_expo_and_root_calculations.py @@ -11,3 +11,7 @@ def potentiate(first_number, second_number): def logarithmize(first_number, second_number): return math.log(first_number, second_number) + + +def logarithmize_dualis(first_number): + return math.log2(first_number) diff --git a/src/test/py/logarithmic_ann_expo_and_root_calculations.py b/src/test/py/logarithmic_ann_expo_and_root_calculations.py index d326a54..08cd50d 100644 --- a/src/test/py/logarithmic_ann_expo_and_root_calculations.py +++ b/src/test/py/logarithmic_ann_expo_and_root_calculations.py @@ -18,6 +18,9 @@ class primitive_calculations(unittest.TestCase): def test_8_log_3_equals_2(self): self.assertEqual(logarithmize(4, 2), 2) + def test_4_ld_equals_2(self): + self.assertEqual(logarithmize_dualis(4), 2) + if __name__ == "__main__": unittest.main()