News:

  • June 10, 2026, 04:17:28 AM

Login with username, password and session length

Author Topic: Real Numbers  (Read 9248 times)

markmc

  • Newbie
  • *
  • Posts: 1
Real Numbers
« on: October 14, 2015, 08:09:39 PM »
Is there a way to disable scientific notation if the number is more than 7 digits ?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Real Numbers
« Reply #1 on: October 15, 2015, 08:49:56 AM »
Right now, no.  We can definitely add a "Decimal" format to the Data View for REALs that would always show it in the non-exponential form.

Currently, the display format "Real" will fully display the number as "Decimal" format up to the millions (1234567.) or down to the ten billionths (0.0001234567).  When you get bigger (or smaller), the potential screen real estate needed can get big.  The number of significant digits in 32-bit IEEE floating point is 7 decimal digits anyway, hence the "widths" of the "Real" format display showing up that way.

Let's look at something large like 1.0E+039.  In order to display that in Decimal format, it would take a 1 followed by 39 0's:

1000000000000000000000000000000000000000.

If we added commas to help with deciphering the "magnitude", then it would look like

1,000,000,000,000,000,000,000,000,000,000,000,000,000.

(I would say that Decimal would show commas, but that still won't help with really small number like 1.0E-39).  But what's great about having options, is that it's quite easy for the user to change it to Real or even Exponential when these situations arise ;D.

Definitely do-able.
« Last Edit: October 15, 2015, 09:00:15 AM by franji1 »

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Real Numbers
« Reply #2 on: October 15, 2015, 01:41:22 PM »
As long as you're in the mood to Do-More, I've always liked engineering notation (like scientific notation, but exponents are limited to multiples of three and the mantissa ranges from 1 to 999.99)

I'd suggest either changing the existing format to that, or at least make it a persistent user-selectable option.

Thanks!




I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Real Numbers
« Reply #3 on: October 15, 2015, 01:44:23 PM »
I've always liked engineering notation...
make it a persistent user-selectable option
Also every do-able!

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Real Numbers
« Reply #4 on: October 15, 2015, 01:53:08 PM »
I'd still want normal decimal when it would fit, just persistent in the sense that it's remembered when you switch to exponential because of magnitude.   Siemens has issues with this in online SCL windows.   They keep wanting to show floating points in exponential, even when the value's small.   You can change the format, but you can't do it in masse, you have to do it for each variable,  and then the next time you go online it reverts.   :(
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.