title: Program Calculate Area Octagon
signature: program_calculate_area_octagon <- function(side) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      abs(actual - expected) < 1e-09
  }
  
  driver <- function(side, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(side), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          5859.798616323926, 
          165794860.15449765
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          -6381.210375893524, 
          196612808.27272156
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          2442.246292006922, 
          28799476.852711495
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          -9624.81536339737, 
          447291345.3087225
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          8679.436805247444, 
          363738081.5089271
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          -2682.3245401089525, 
          34739881.027797274
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          7216.9161613024435, 
          251483213.5426547
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          -5881.789859815442, 
          167041618.6125096
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          2497.776395789202, 
          30124010.84898392
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          -9598.912195459263, 
          444887003.7391194
      )))
  
  }
  
  main()
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 );
  }