PI
The function PI outputs a numerical estimation of π.
This function takes no input. It outputs the numerical estimation of the constant pi, 3.141592653589793.
Declaration
Parameters
The PI function takes no parameters.
Return Values
number (type: Number
) An approximation of π, the constant pi.
Examples
The following example shows the output of the function PI. Note that pi is an irrational number; the output of PI is an approximation of the value of pi rather than an infinite decimal. This should be sufficient for most practical applications, though it can be the source of small rounding errors:
Last updated