code: public static function GAMMALN($value)
      {
          $value = Functions::flattenSingleValue($value);
  
          if (is_numeric($value)) {
              if ($value <= 0) {
                  return Functions::NAN();
              }
  
              return log(self::gamma($value));
          }
  
          return Functions::VALUE();
      }
docs: GAMMALN.
  
  Returns the natural logarithm of the gamma function.
  
  @param float $value
  
  @return float