Feature SS-21
3 votes

Results formatting: Significant digits

Created by Martin Kraska on 3/23/2014 2:18 AM Last Updated by brotjob on 12/11/2014 11:22 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

Means to specify the number of significant digits in results. Example implementation in the attachment.

The results formatting of engineering computations should reflect their valid precision. Typically, this is assumed to be tree significant digits, perhaps 4 if the leading digit is 1. This is based on the precision of most available input data and in former times that was the achievable precision of the slide rule.

I find myself adjusting the number of digits in the right button menu on a case by case basis and have to correct the settings if Input data changes.

Currently, the only way to enforce a given relative precision independent of the result's order of magnitude is to set the exponential threshold to 1 and to specify the number of digits accordingly. However, the exponential threshold is better used to provide readablity than to control precision.

    brotjob (Thursday, December 11, 2014 11:22 PM) #

I updated the function roundc() to provide some exceptions handling and dealing with units too. There may still be issues with very large or small numbers.

    brotjob (Thursday, November 6, 2014 11:30 PM) #

I programmed a function roundc(x,n) that performs what I suggest. n is the number of counts, x the value to be rounded.

    smath (Thursday, October 23, 2014 12:07 AM) #

Please could you explain idea with "counts" with more examples?

    brotjob (Thursday, October 16, 2014 10:48 AM) #

Instead of specifying digits which could be a rational number I suggest an input for "counts" which would be a natural number. Reasonable values would be 1000 or 2000 counts. What Martin suggests with "if the leading digit is 1" means 2000 counts or log(2000)=3.301 digits.