math.exp

From ComputerCraft
Jump to navigation Jump to search

math.exp
Function
Syntax
math.exp()
Returns number
API math
Source Lua (source)

Returns e raised to the power of num.

ExampleExampleCompute e
Prints the approximate value of Euler's constant, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle e}
Code
print(math.exp(1))
Output
2.718281828459