Working with PTC Mathcad Prime > Working with Math Expressions > Evaluating Math Expressions > Example: Display of Non-Integer Decimal Results
  
Example: Display of Non-Integer Decimal Results
Non-integer Decimal Number with <= 15 Total Digits
1. On the Math Formatting tab, in the Results group, set Result Format to Decimal, Display Precision to 3 and disable Show Trailing Zeros.
2. Enter and evaluate a non-integer decimal number with less than or equal to 15 total digits.
Click to copy this expression
The number has five digits to the left of the decimal point and four digits to the right. The result shows the exact five left-hand side (LHS) digits but only three right-hand side (RHS) digits. Only the first two RHS digits are exact, followed by one approximate digit representing the most significant digit of rounding off 89 to 90 and discarding the trailing zero.
3. Select the result and enable Show Trailing Zeros:
Click to copy this expression
The result remains unchanged because there are already three RHS digits in the result.
4. Select the result and set the Display Precision to 15:
Click to copy this expression
The result now shows the original RHS digits with no rounding off. PTC Mathcad pads the result with zeros in order to comply with the current setting of Display Precision.
Non-integer Decimal Number with > 15 Total Digits (Integer < 15 digits, Fraction > 3)
1. Set Display Precision to 3 and disable Show Trailing Zeros
2. Enter and evaluate a non-integer decimal number with less than 15 LHS digits and more than three RHS digits, but with total digits > 15.
Click to copy this expression
The result shows the exact LHS digits, followed by the exact first two RHS digits followed by one approximate digit. The approximate digit represents the most significant digit of rounding off the remaining RHS digits and discarding the trailing zeros.
3. Select the result and enable Show Trailing Zeros. The results remain unchanged.
4. Select the result and set Display Precision to 15:
Click to copy this expression
The result shows a total of four (14 - LHS) of the original RHS digits, one digit that represents the MSD of rounding-off of 567890 or 600000, padded with 10 zeros (15 - 5). The total number of LHS+RHS digits is kept at 15 in order to comply with the current setting of Display Precision.
Non-integer Decimal Number with > 15 Total Digits (Integer = 15 digits, Fraction > 3)
1. Set Display Precision to 3 and disable Show Trailing Zeros.
2. Enter and evaluate a non-integer decimal number with exactly 15 LHS digits and more than three RHS digits.
Click to copy this expression
The result shows the exact 15 LHS digits, no decimal point, and no RHS digits.
3. Select the result and enable Show Trailing Zeros:
Click to copy this expression
A decimal point and three zeros are added.
4. Select the result and set Display Precision to 15:
Click to copy this expression
The number of fractional zeros increases to 15.
Non-integer Decimal Number with > 15 Total Digits (Integer & Fractional > 15 digits)
1. Set Display Precision to 3 and disable Show Trailing Zeros.
2. Enter and evaluate a non-integer decimal number with more than 15 LHS digits and more than 15 RHS digits.
Click to copy this expression
The result shows the exact first 14 LHS digits, followed by one approximate digit representing the most significant digit of rounding off the remaining LHS digits 567 to 600.
3. Select the result and enable Show Trailing Zeros.
Click to copy this expression
A decimal point and three zeros are added.
4. Select the result and set Display Precision to 15:
Click to copy this expression
The number of fractional zeros increases to 15.