code: public static function FACTDOUBLE($factVal)
      {
          $factLoop = Functions::flattenSingleValue($factVal);
  
          if (is_numeric($factLoop)) {
              $factLoop = floor($factLoop);
              if ($factVal < 0) {
                  return Functions::NAN();
              }
              $factorial = 1;
              while ($factLoop > 1) {
                  $factorial *= $factLoop--;
                  --$factLoop;
              }
  
              return $factorial;
          }
  
          return Functions::VALUE();
      }
docs: FACTDOUBLE.
  
  Returns the double factorial of a number.
  
  Excel Function:
  FACTDOUBLE(factVal)
  
  @category Mathematical and Trigonometric Functions
  
  @param float $factVal Factorial Value
  
  @return int Double Factorial