MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / exp

Method exp

tools/python-3.11.9-amd64/Lib/_pydecimal.py:4453–4475  ·  view source on GitHub ↗

Returns e ** a. >>> c = ExtendedContext.copy() >>> c.Emin = -999 >>> c.Emax = 999 >>> c.exp(Decimal('-Infinity')) Decimal('0') >>> c.exp(Decimal('-1')) Decimal('0.367879441') >>> c.exp(Decimal('0')) Decimal('1')

(self, a)

Source from the content-addressed store, hash-verified

4451 return r
4452
4453 def exp(self, a):
4454 """Returns e ** a.
4455
4456 >>> c = ExtendedContext.copy()
4457 >>> c.Emin = -999
4458 >>> c.Emax = 999
4459 >>> c.exp(Decimal('-Infinity'))
4460 Decimal('0')
4461 >>> c.exp(Decimal('-1'))
4462 Decimal('0.367879441')
4463 >>> c.exp(Decimal('0'))
4464 Decimal('1')
4465 >>> c.exp(Decimal('1'))
4466 Decimal('2.71828183')
4467 >>> c.exp(Decimal('0.693147181'))
4468 Decimal('2.00000000')
4469 >>> c.exp(Decimal('+Infinity'))
4470 Decimal('Infinity')
4471 >>> c.exp(10)
4472 Decimal('22026.4658')
4473 """
4474 a =_convert_other(a, raiseit=True)
4475 return a.exp(context=self)
4476
4477 def fma(self, a, b, c):
4478 """Returns a multiplied by b, plus c.

Callers

nothing calls this directly

Calls 2

_convert_otherFunction · 0.85
expMethod · 0.45

Tested by

no test coverage detected