PyCalc

Calculate better

PyCalc Help

Result Formatting


The Python language was developed as a general purpose programming language and does not always produce output that is easiest for people to read. PyCalc can apply some formatting to the Python results to improve this. This can be configured in Settings+HelpResult format.

The options are as follows:

Enable formatting

This control allows you to disable all result formatting with a single toggle. Unless there's some good reason to disable it, we recommend leaving it enabled.

Rounding Digits

This determines how many decimal digits are displayed. Sometimes you may want many digits of precision, but other times it's nicer to see a simple and clean result. Here are some examples (using Decimal mode):

Expression Rounding digits == 2 Rounding digits == 6
pi 3.14 3.141593
pi * 1e20 3.14e20 3.141593e20
pi * 1e-20 3.14e-20 3.141593e-20

The Rounding digits value also affects the results in Fractional mode by limiting the denominator of the fraction. In this way you can use this option to find the nearest fraction to a given decimal number:

Expression Rounding digits == 2 Rounding digits == 6
pi 3+14/99 3+140914/995207

Grouping Separators

It can be difficult to read large numbers (123456789) without the use of "grouping separators": 123,456,789. You can enable or disable grouping separators here.

In some countries commas (,) are used as grouping separators and in others dots (.) are used. By default, PyCalc uses commas, but you can use the "Localize" setting (below) to change this.

This option only affects the way that results are displayed in PyCalc. It does not affect how you enter numbers into PyCalc. Underscores are the only grouping separators that may be used when entering numbers: 123_456_789.

Localize

This option is only available if PyCalc detects that your locale (as set in iOS settings) would result in a different decimal separator or grouping separator. If you with to have PyCalc adapt to your locale, enable this setting.

Big Number Threshold

Sometimes numbers are easiest to read in their simple decimal format, and other times they're easier to read using scientific notation. This setting determines when each format will be used for large numbers. A few examples may help (Rounding digits == 2):

Expression Big # Thresh == 4 Big # Thresh == 8
pi * 1e2 314.16 314.16
pi * 1e6 3.14e6 3,141,592.65
pi * 1e10 3.14e10 3.14e10

Small Number Threshold

The Small Number Threshold is very similar to the Big Number Threshold, except it determines when scientific notation will be used for small numbers. Examples (Rounding digits == 4):

Expression Small # Thresh == -4 Small # Thresh == -8
pi * 1e-2 0.0314 0.0314
pi * 1e-6 3.1416e-6 0.0
pi * 1e-10 3.1416e-10 3.1416e-10