Browse Source

Added logaritim dualis functionality with one position arugment and test for it

remotes/origin/feature/feature-fractions
fdai7783 11 months ago
committed by fdai7764
parent
commit
28a45bbb3d
  1. 4
      src/main/py/logarithmic_and_expo_and_root_calculations.py
  2. 3
      src/test/py/logarithmic_ann_expo_and_root_calculations.py

4
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)

3
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()
Loading…
Cancel
Save