Exp - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

344

Exp

Returns e raised to the power of number. The constant e equals 2.71828182845904, the
base of the natural logarithm.
See also
Syntax
Exp( number )
number
Exponent applied to the base e.
Usage
To calculate powers of other bases, use ^ (the exponentiation operator). Exp is the
inverse of Log, the natural logarithm of number.
Examples
<!--- 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 that 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 that 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,
the natural logarithm of that number, 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>
Log
and Log10.
CFML Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents