title: Find Harmonic Mean Using Arithmetic Mean Geometric Mean
signature: findHarmonicMeanUsingArithmeticMeanGeometricMean :: Integer -> Integer -> Double
  findHarmonicMeanUsingArithmeticMeanGeometricMean a b = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-09
  
  driver :: Integer -> Integer -> Double -> String
  driver a b expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME a b) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (54) (83) (65.43065693430657) )
  
      printf "TEST-1...%s\n" (driver (42) (56) (48.0) )
  
      printf "TEST-2...%s\n" (driver (63) (12) (20.16) )
  
      printf "TEST-3...%s\n" (driver (19) (76) (30.4) )
  
      printf "TEST-4...%s\n" (driver (41) (50) (45.054945054945065) )
  
      printf "TEST-5...%s\n" (driver (7) (26) (11.030303030303031) )
  
      printf "TEST-6...%s\n" (driver (39) (42) (40.444444444444436) )
  
      printf "TEST-7...%s\n" (driver (11) (64) (18.773333333333333) )
  
      printf "TEST-8...%s\n" (driver (96) (81) (87.86440677966101) )
  
      printf "TEST-9...%s\n" (driver (15) (54) (23.47826086956522) )
  
source_py: def find_harmonic_mean_using_arithmetic_mean_geometric_mean(a, b):
      AM = ((a + b) / 2)
      GM = math.sqrt((a * b))
      HM = ((GM * GM) / AM)
      return HM
source_cpp: double find_harmonic_mean_using_arithmetic_mean_geometric_mean(int a, int b) {
    double AM, GM, HM;
    AM = ( a + b ) / 2;
    GM = sqrt ( a * b );
    HM = ( GM * GM ) / AM;
    return HM;
  }