title: Program Calculate Area Octagon
signature: programCalculateAreaOctagon :: Double -> Double
  programCalculateAreaOctagon side = 
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 :: Double -> Double -> String
  driver side expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME side) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (5859.798616323926) (165794860.15449765) )
  
      printf "TEST-1...%s\n" (driver (-6381.210375893524) (196612808.27272156) )
  
      printf "TEST-2...%s\n" (driver (2442.246292006922) (28799476.852711495) )
  
      printf "TEST-3...%s\n" (driver (-9624.81536339737) (447291345.3087225) )
  
      printf "TEST-4...%s\n" (driver (8679.436805247444) (363738081.5089271) )
  
      printf "TEST-5...%s\n" (driver (-2682.3245401089525) (34739881.027797274) )
  
      printf "TEST-6...%s\n" (driver (7216.9161613024435) (251483213.5426547) )
  
      printf "TEST-7...%s\n" (driver (-5881.789859815442) (167041618.6125096) )
  
      printf "TEST-8...%s\n" (driver (2497.776395789202) (30124010.84898392) )
  
      printf "TEST-9...%s\n" (driver (-9598.912195459263) (444887003.7391194) )
  
source_py: def program_calculate_area_octagon(side):
      return (((2 * (1 + math.sqrt(2))) * side) * side)
source_cpp: double program_calculate_area_octagon(double side) {
    return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
  }