manual:chapter6:constants:cmd_piconst

Synopsis


Push the symbolic constant 'π' on the stack

Stack Diagram


Input Stack Output Stack
Cπ
Level 1 / Argument 1 Level 1

Legend

Keyword type Analytic Function
Parallel list processing capabilities Group 1 Commands that cannot parallel process
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 ultimately converted to a real number.

Compatibility


π is not fully equivalent to its userRPL counterpart.

In particular:

  • userRPL returns the closest approximation of $π$ to 12-digits accuracy.

Usage


Input

« 6 SETPREC
  π →NUM
  DUP
  1 *
»


Output

4:                                      
3:                                      
2:                        3.14159265359.
1:                              3.14159.
…………………………………………………………………………………………………………
                                        

Related Commands


Constants 4

Command Short Description
π
і
е
ј
  • manual/chapter6/constants/cmd_piconst.txt
  • Last modified: 2021/09/19 15:08
  • by jojo1973