math.exp

math.exp
Function
Syntax
math.exp(
  • num : number
)

Returns number
API math
Source Lua (source)

Returns e raised to the power of num.

ExampleCompute e
Prints the approximate value of Euler's constant,
Code
<nowiki>
print(math.exp(1))
    </nowiki>
Output
2.718281828459
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.