MACROMEDIA COLFUSION MX 7-CFML Reference page 582

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

Exp
Description
Calculates the exponent whose base is e that represents number. The constant e equals
2.71828182845904, the base of the natural logarithm. This function is the inverse of
natural logarithm of number.
Returns
The constant e, raised to the power of number.
Category
Mathematical functions
Function syntax
Exp(number)
See also
,
Log
Log10
Parameters
Parameter
number
Usage
To calculate powers of other bases, use the exponentiation operator (^).
Example
<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 its natural logarithm
<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 its logarithm to base 10
<cfelse><br>
The logarithm of #FORM.number# to base 10: #log10(FORM.number)#
</cfif>
</cfoutput>
</cfif>
<cfform action = "exp.cfm">
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>
582
Chapter 3: ColdFusion Functions
Description
Exponent to apply to the base e
, the
Log

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents