Macaulay2 » Documentation
Packages » Python » PythonObject » expm1(PythonObject)
next | previous | forward | backward | up | index | toc

expm1(PythonObject) -- exponential minus one of a python object

Description

This calls Python's built-in math.expm1 function, which computes the exponential of x minus one. This is more accurate than computing exp x - 1 for small values of x.

i1 : exp toPython 1e-10 - 1

o1 = 1.000000082740371e-10

o1 : PythonObject of class float
i2 : expm1 toPython 1e-10

o2 = 1.00000000005e-10

o2 : PythonObject of class float

See also

Ways to use this method:


The source of this document is in Python/doc/exp-log.m2:50:0.