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

Troy Pullis Troy Pullis added
firstXDayOfMonth
23 day(s) ago

Henry Ho Henry Ho added
arrayMap
a while ago

Henry Ho Henry Ho added
queryGetRow
a while ago

Tony Felice Tony Felice added
getRowFromQuery
a while ago

Top Rated

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

Barney Boisvert indentXml
Rated 5.0, 12 time(s)

Rachel Lehman deAccent
Rated 5.0, 8 time(s)

Markus Schneebeli                                 ListRemoveByStri...
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson