title: Program Calculate Volume Octahedron
signature: function programCalculateVolumeOctahedron(side: number): number {
source_py: def program_calculate_volume_octahedron(side):
      return (((side * side) * side) * (math.sqrt(2) / 3))
source_cpp: double program_calculate_volume_octahedron(double side) {
    return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) );
  }
question_info.test_list: [{"idx": 0, "outputs": 17807230335.375374, "inputs": {"side": 3355.322051344013}}, {"idx": 1, "outputs": -333508958.9649689, "inputs": {"side": -891.0551553192736}}, {"idx": 2, "outputs": 263998930936.71603, "inputs": {"side": 8242.699647177868}}, {"idx": 3, "outputs": -374202387762.81836, "inputs": {"side": -9259.146104439229}}, {"idx": 4, "outputs": 216287285897.3415, "inputs": {"side": 7712.806145993083}}, {"idx": 5, "outputs": -58885228987.99368, "inputs": {"side": -4998.858862079315}}, {"idx": 6, "outputs": 439772223071.1617, "inputs": {"side": 9771.127582524628}}, {"idx": 7, "outputs": -74883158892.28471, "inputs": {"side": -5415.8106399098115}}, {"idx": 8, "outputs": 141830229.25431916, "inputs": {"side": 670.0774772280249}}, {"idx": 9, "outputs": -166494655500.3635, "inputs": {"side": -7068.634369272122}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return Math.abs(actual - expected) < 1e-09;
  }
  
  function driver(side: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(side),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(3355.322051344013, 17807230335.375374);
    console.log(`TEST-0...${result}`);
  
    result = driver(-891.0551553192736, -333508958.9649689);
    console.log(`TEST-1...${result}`);
  
    result = driver(8242.699647177868, 263998930936.71603);
    console.log(`TEST-2...${result}`);
  
    result = driver(-9259.146104439229, -374202387762.81836);
    console.log(`TEST-3...${result}`);
  
    result = driver(7712.806145993083, 216287285897.3415);
    console.log(`TEST-4...${result}`);
  
    result = driver(-4998.858862079315, -58885228987.99368);
    console.log(`TEST-5...${result}`);
  
    result = driver(9771.127582524628, 439772223071.1617);
    console.log(`TEST-6...${result}`);
  
    result = driver(-5415.8106399098115, -74883158892.28471);
    console.log(`TEST-7...${result}`);
  
    result = driver(670.0774772280249, 141830229.25431916);
    console.log(`TEST-8...${result}`);
  
    result = driver(-7068.634369272122, -166494655500.3635);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: programCalculateVolumeOctahedron
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js