title: Program Calculate Area Octagon
signature: function programCalculateAreaOctagon($side) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return abs($actual - $expected) < 1e-09;
  }
  
  function driver($side, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($side), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      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));
      
  }
  
  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 );
  }