CFLib.org – Common Function Library Project

Sech(x)

Last updated October 9, 2001

Version: 1 | Requires: ColdFusion 5 | Library: MathLib

 
Rated 3 time(s). Average Rating: 4.3

Description:
Returns the hyperbolic secant of an angle. All angles are expressed in radians.

Return Values:
Returns a numeric value.

Example:

view plain print about
<CFSET x=Pi()/2>
<CFOUTPUT>
Given x=#x#<BR>
The Sech of #x# radians is: #Sech(x)#
</CFOUTPUT>

Parameters:

Name Description Required
x Any angle expressed in radians. Yes

Full UDF Source:

view plain print about
<cfscript>
/**
 * Returns the hyperbolic secant of an angle.
 * 
 * @param x      Any angle expressed in radians. 
 * @return Returns a numeric value. 
 * @author Rob Brooks-Bilson (rbils@amkor.com) 
 * @version 1.0, October 9, 2001 
 */

function Sech(x){
  return 2/(Exp(X)+Exp(-x));
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Adam Cameron Adam Cameron added
createPrimeNumbe...
14 day(s) ago

Ray Ford Ray Ford added
timeZoneNow
29 day(s) ago

Henry Ho Henry Ho added
queryExecute
a while ago

Rick Root Rick Root added
deleteDirectory
a while ago

Top Rated

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 48 time(s)

Barney Boisvert indentXml
Rated 5.0, 12 time(s)

Rachel Lehman deAccent
Rated 5.0, 9 time(s)

Darwan Leonardo Sitepu splitNumber
Rated 5.0, 8 time(s)

Created by Raymond Camden / Design by Justin Johnson