| Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
manual:chapter6:constants:cmd_piconst [2019/10/20 00:31] jojo1973 Fixed related commands |
manual:chapter6:constants:cmd_piconst [2021/09/19 15:08] (current) jojo1973 |
| ==== π ==== | ==== π ==== |
| ---- | |
| <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> | <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> |
| ---- | ---- |
| ---- | ---- |
| ^ __Input Stack__ ^ ^ __Output Stack__ ^ | ^ __Input Stack__ ^ ^ __Output Stack__ ^ |
| | | **→** | **'π'** | | | **** | **→** | **C<sub>π</sub>** | |
| | //Level 1// | //→// | //Level 1// | | | //Level 1 / Argument 1// | //→// | //Level 1// | |
| |
| {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |
| |
| |**Type**| [[manual:chapter5:basics#analytic-functions|Analytic Function]] || | | **Keyword type** | [[manual:chapter5:basics#analytic-functions|Analytic Function]] || |
| |**Parallel list processing**| [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]] || | | **Parallel list processing capabilities** | [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]] | //Commands that cannot parallel process// | |
| |**Affected by flags**| None || | | **Affected by flags** | //None// || |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| </callout> | </callout> |
| |
| The ''π'' function pushes on the stack a symbolic representation of the constant $π$. | The ''π'' function pushes on the stack a symbolic representation of the constant $π$. |
| |
| Application of the ''[[manual:chapter6:operators:cmd_ovr_num|→NUM]]'' operator returns its closest approximation to 2000-digits accuracy, irrespective of the numeric precision defined by ''[[manual:chapter6:arithmetic:cmd_setprec|SETPREC]]''. This is done to ensure maximum accuracy. | Application of the ''[[manual:chapter6:operators:cmd_ovr_num|→NUM]]'' operator returns its closest approximation to 2000-digits accuracy, irrespective of the numeric precision defined by ''[[manual:chapter6:arithmetic:cmd_setprec|SETPREC]]''. This is done to ensure maximum accuracy if the symbolic expression is ultimately converted to a real number. |
| </callout> | </callout> |
| |
| <callout type="warning" icon="true" title="Compatibility"> | <callout type="warning" icon="true" title="Compatibility"> |
| ---- | ---- |
| This command is only partially compatible with userRPL. | ''π'' is not fully equivalent to its **userRPL** counterpart. |
| |
| In particular: | In particular: |
| |
| * userRPL returns the closest approximation of $π$ to 12-digits accuracy. | * **userRPL** returns the closest approximation of $π$ to 12-digits accuracy. |
| </callout> | </callout> |
| |
| <callout type="info" icon="true" title="Usage"> | <callout type="info" icon="true" title="Usage"> |
| ---- | ---- |
| The following program | **__Input__** |
| <code> | <code> |
| « 6 SETPREC | « 6 SETPREC |
| » | » |
| </code> | </code> |
| will result in | \\ |
| | **__Output__** |
| <code> | <code> |
| 2: 3.14159265359. | 4: |
| 1: 3.14159. | 3: |
| …………………………………………………………………………………… | 2: 3.14159265359. |
| | 1: 3.14159. |
| | ………………………………………………………………………………………………………… |
| | |
| </code> | </code> |
| </callout> | </callout> |
| {{page>manual:chapter6:constants&nofooter&noeditbtn&inline}} | {{page>manual:chapter6:constants&nofooter&noeditbtn&inline}} |
| </callout> | </callout> |
| | |