Litipk\BigNumbers\DecimalConstants::e PHP Method

e() public static method

Returns the Euler's E number.
public static e ( integer $scale = 32 ) : Decimal
$scale integer
return Decimal
    public static function e($scale = 32)
    {
        if (!is_int($scale)) {
            throw new InvalidArgumentTypeException(['integer'], gettype($scale));
        }
        if ($scale < 0) {
            throw new \InvalidArgumentException("\$scale must be positive.");
        }
        return self::$ONE->exp($scale);
    }

Usage Example

 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage $scale must be positive.
  */
 public function testNegativeParamsOnE()
 {
     DecimalConstants::e(-3);
 }