This is an old revision of the document!
π
Synopsis
Push the symbolic constant 'π' on the stack
Stack Diagram
| Input Stack | Output Stack | |
|---|---|---|
| → | π | |
| Level 1 | → | Level 1 |
| Type | Analytic Function | |
| Parallel list processing | Group 1 | |
| Affected by flags | None | |
Description
The π function pushes on the stack a symbolic representation of the constant $π$.
Application of the →NUM operator returns its closest approximation to 2000-digits accuracy, irrespective of the numeric precision defined by SETPREC. This is done to ensure maximum accuracy if the symbolic expression is finally converted to a real number.
Compatibility
This command is only partially compatible with userRPL.
In particular:
- userRPL returns the closest approximation of $π$ to 12-digits accuracy.
Usage
The following program
« 6 SETPREC π →NUM DUP 1 * »
will result in
2: 3.14159265359. 1: 3.14159. ……………………………………………………………………………………