< Back to SnippetsRationalize π
Turns a decimal value in the y-register into the closest \(\frac{a\cdot \pi}{b}\), where maximum value of b is in the x-register.
<root>
...
<values>
...
<function ID="rationalizePi" label="rat" subscript="π" parameters="2" supportsMacros="true" supportsSolver="true">
<StackBox.ApplyConsole/>
<StackBox.Swap2/>
<MathPI.Action/>
<MathDivide.Action/>
<StackBox.Swap2/>
<MathRationalize.Action/>
<MathPI.Action/>
<MathMultiply.Action/>
</function>
...
</values>
</root>