Returns e raised to the power of number. The constant e equals 2.71828182845904, the base of the natural logarithm.
Exp(number)
Parameter |
Description |
---|---|
number |
Exponent applied to the base e |
To calculate powers of other bases, use ^ (the exponentiation operator). Exp
is the inverse of Log
, the natural logarithm of number.
<!--- This example shows how to use Exp ---> <html> <head> <title>Exp Example</title> </head> <body bgcolor = silver> <H3>Exp Example</H3> <cfif IsDefined("FORM.Submit")> <cfoutput> <P>Your number, #FORM.number# <BR>#FORM.number# raised to the E power: #exp(FORM.number)# <cfif FORM.number LTE 0> <BR>You must enter a positive real number to see the natural logarithm of the number<cfelse><BR> The natural logarithm of #FORM.number#: #log(FORM.number)#</cfif> <cfif FORM.number LTE 0><BR> You must enter a positive real number to see the logarithm of the number to base 10<cfelse><BR> The logarithm of #FORM.number# to base 10: #log10(FORM.number)#</cfif> </cfoutput> </cfif> <cfform action = "exp.cfm" method = "POST"> Enter a number to see its value raised to the E power,its natural logarithm, and the logarithm of number to base 10. <cfinput type = "Text" name = "number" message = "You must enter a number" validate = "float" required = "No"> <input type = "Submit" name = "Submit"> </cfform> </body> </html>