Click or drag to resize

Exp Function

X#
Calculate the numeric value of a natural logarithm.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax
 FUNCTION Exp(
	nExponent AS USUAL
) AS FLOAT
Request Example View Source

Parameters

nExponent
Type: Usual
The power to which e is to be raised.

Return Value

Type: Float
A floating point number that is equivalent to the value e raised to nExponent.
Remarks
Exp() calculates the value y (the antilogarithm) of the following equation:
X#
1e^x = y
where e is the base of natural logarithms (2.71828...) and x is nExponent. Exp() and Log() are inverse functions.
Examples
This example demonstrates several invocations of Exp():
X#
1? Exp(1)                    // 2.72
2SetDecimal(10)
3? Exp(1)                        // 2.7182818285
4? Log(Exp(1))                // 1.0000000000
See Also