title: Program Calculate Area Octagon
signature: func programCalculateAreaOctagon(side float64) float64 {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual float64, expected float64) bool {
      return math.Abs(actual - expected) < 1e-09
  }
  
  func driver(side float64, expected float64) string {
      if validateSolution(PLACEHOLDER_FN_NAME(side),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(5859.798616323926, 165794860.15449765)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(-6381.210375893524, 196612808.27272156)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(2442.246292006922, 28799476.852711495)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(-9624.81536339737, 447291345.3087225)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(8679.436805247444, 363738081.5089271)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(-2682.3245401089525, 34739881.027797274)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(7216.9161613024435, 251483213.5426547)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(-5881.789859815442, 167041618.6125096)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(2497.776395789202, 30124010.84898392)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(-9598.912195459263, 444887003.7391194)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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 );
  }