User Guide Cancel

Pi

 

Description

Gets the mathematical constant p, accurate to 15 digits.

Returns

The number 3.14159265358979.

Category

Mathematical functions

Function syntax

Pi()
Pi()
Pi()

See also

ASinCosSinTan

Example

<h3>Pi Example</h3>
<!--- By default, ColdFusion displays only 11 significant digits.
Use NumberFormat to display all 15. --->
The Pi function Returns the number
<cfoutput>
#NumberFormat(Pi(), "_.
")#,
</cfoutput> the mathematical constant pi, accurate to 15 digits.
<h3>Pi Example</h3> <!--- By default, ColdFusion displays only 11 significant digits. Use NumberFormat to display all 15. ---> The Pi function Returns the number <cfoutput> #NumberFormat(Pi(), "_. ")#, </cfoutput> the mathematical constant pi, accurate to 15 digits.
<h3>Pi Example</h3> 
<!--- By default, ColdFusion displays only 11 significant digits. 
Use NumberFormat to display all 15. ---> 
The Pi function Returns the number 
<cfoutput> 
#NumberFormat(Pi(), "_.




")#, 
</cfoutput> the mathematical constant pi, accurate to 15 digits.

Get help faster and easier

New user?