Returns the Euler's number e (= 2.178...) to the power of a numeric expression.
Exp(x)
Exp2(x)
Exp10(x)
Exp(x) calculates the x-th power of Euler's number e = 2.178...., Exp2(x) calculates 2 ^ x, while Exp10(x) calculates 10 ^ x.
In all of these functions, x can be positive, negative or zero.
Debug.Show
Trace Exp(Sqr(2))
Trace Exp2(8)
Trace Exp10(5)
Exp(x) is the reverse function of Log(x), which means:
Exp(Log(PI)) = PI = 3.14...
Similarly, Log2(x) and Log10(x) are the reverse functions of Exp2(x) and Exp10(x) respectively.
OpenW 1
Local a% = 4
a% = Exp(a%) : Print "Exp(a%) = "; a%
a% = Log(a%) : Print "Log(a%) = "; a%
a% = Exp2(a%) : Print "Exp2(a%) = "; a%
a% = Log2(a%) : Print "Log2(a%) = "; a%
a% = Exp10(a%) : Print "Exp10(a%) = "; a%
a% = Log10(a%) : Print "Log10(a%) = "; a%
<NOTE: Assigning too high - such as Exp2(10000) will result in an overrun error; assigning too low a number - such as Exp2(-10000) - will result in an inaccurate result: in the latter example, zero is returned.{Created by Sjouke Hamstra; Last updated: 05/10/2014 by James Gaite}