HP Forums
Fixed to Scientific notation - transition of numerical display - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Fixed to Scientific notation - transition of numerical display (/thread-20665.html)



Fixed to Scientific notation - transition of numerical display - Johnh - 10-19-2023 12:51 AM

This is a simple thing but it's a bit of an annoyance IMO:

As an engineer, I normally want to see 4 or 5 decimal places on my calcs. But on all the HP's that I've seen either in person or as emulations, if you set say FIX 4, and start generating smaller numbers, you start to lose digits until the machine swaps to a scientific notation.

eg, If you set FIX 4 and take the square root of 2, divided by successive factors of 10:

1.4142
0.1414
0.0141
0.0014
0.0001
1.4142 E-5
1.4142 E-6 etc

Excel (general format), and various school calculators, swap to scientific display while there's still enough digits on view.

Obviously, it's not a real show-stopper, and engineers and others have worked with this behaviour for 50 years. But it would be great to have a mode that did something like this:

1.4142
0.14142
0.014142
0.0014142
1.4142 E-4
1.4142 E-5 etc

Any comments?


RE: Fixed to Scientific notation - transition of numerical display - Pyjam - 10-19-2023 11:34 AM

(10-19-2023 12:51 AM)Johnh Wrote:  This is a simple thing but it's a bit of an annoyance IMO:

As an engineer, I normally want to see 4 or 5 decimal places on my calcs. But on all the HP's that I've seen either in person or as emulations, if you set say FIX 4, and start generating smaller numbers, you start to lose digits until the machine swaps to a scientific notation.

eg, If you set FIX 4 and take the square root of 2, divided by successive factors of 10:

1.4142
0.1414
0.0141
0.0014
0.0001
1.4142 E-5
1.4142 E-6

FIX should remain fixed, and not switch to scientific mode. Precision being variable, this is a format for accountants, not engineers.
So, below 0.0001, we should simply see 0.0000.

(10-19-2023 12:51 AM)Johnh Wrote:  But it would be great to have a mode that did something like this:

1.4142
0.14142
0.014142
0.0014142
1.4142 E-4
1.4142 E-5

This is what you see with SIG-4 on DM42 using the C47 application.

Or you can specify a transition to engineering format rather than scientific and you get:

1.4142
0.14142
0.014142
0.001414·2
0.000141·42
14.142×10⁻⁶

In case you're not familiar with this format, here's what you get when you multiply:

1.4142
14.142
141.42
1,414.2
14,142.
141,420.
1,414,200.
14,142,000.
141.42×10⁶
1.4142×10⁹



RE: Fixed to Scientific notation - transition of numerical display - Johnh - 10-19-2023 08:42 PM

hi @Pyjam

Thanks yes that SIG mode would be ideal. I'm glad it exists at least on some machines.


RE: Fixed to Scientific notation - transition of numerical display - vaklaff - 10-20-2023 02:37 AM

DB48X’s take, just a few days old:

(10-16-2023 08:27 PM)c3d Wrote:  Solving this by adding a new setting, MinimumSignificantDigits.

This selects the minimum number of significant digits before switching to scientific notation in FIX mode.

The default value is 0, which is similar to how HP calculators perform. For example, with 2 FIX, the value 0.055 will display as 0.06, and 0.0055 will display as 0.01.

A higher value will switch to scienfic mode to show at least the given number of digits. For instance, with 2 FIX, if the value is 1, then 0.055 will still display as 0.06 but 0.0055 will display as 5.50E-3. If the value is 2, then 0.055 will display as 5.5E-2.

In other words, setting the value to 0 emulates the behaviour of HP calculators. Setting the value to 34 will switch to scientific notation if not all digits can be displayed

See re: Improving FIX mode.