Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

1.0e+9

Featured Replies

I have a calculated result of

1000000000

it ends up as:

1.0e+9

could someone explain this to me.

100000000 (fine)

1000000000 (re-formatter)

1000000001 (fine)

10000000000 (re-formatted)

I must admit to being a little confused.

I need to reformat the calculated result so 1.0e+9 is not much use to me.

best

Stuart

Edited by Guest

What exactly is your question: why is 10^9 converted to scientific notation, or why 10^9 + 1 isn't?

  • Author

Hey Comment,

The first would be good, not specifically that number but why and when I can expect it to occur.

best

Stuart

PS, had a lot of fun with your psychic file.

Edited by Guest

I don't know of any FMI-published rules, but I believe you can expect it when a number has 10 or more digits, and the trailing 9 (or leading 9 in case of a fraction) are zeros.

  • Author

That is good to know.

I am using a custom function to format values into the correct currency format

1,000.00 = $1,000.00 USD

so when i ended up with $1,.0e,+10.00 USD instead of $1,000,000,000,000.00 USD i was slightly put out as i could find nothing wrong with my calculation

now that would seem like an unusual amount but i may very well end up with this value being used in my solution as some of my clients have items valued in the millions so a total of that over a number of years may end up in the billions.

Any thoughts on the best way to tackle these values.

here is my current custom function.

(note the currency sign leading and/or trailing is added separately)

FormatNumber ( value ; thousandSeparator ; decimalSeparator ; precision )

Let ( [

$value = Filter ( value ; "0123456789.,+-e" ) ;

$plusminus = Case ( value < 0 ; "-" ; "" ) ;

$value = Round ( $value ; precision ) ;

$Integer = Int ( $value ) ;

$decimal = Substitute ( $value - $Integer ; "." ; "" ) ;

$paddecimal = $decimal & Choose ( precision - Length ( $decimal ) ; "" ; "0" ; "00" ; "000" ; "0000" ; "00000" ; "000000" ) ;

$IntLength = Length ( $Integer ) ;

$p1 = Right ( $Integer ; 3 ) ;

$p2 = Right ( Left ( $Integer ; $IntLength - 3 ) ; 3 ) ;

$p3 = Right ( Left ( $Integer ; $IntLength - 6 ) ; 3 ) ;

$p4 = Right ( Left ( $Integer ; $IntLength - 9 ) ; 3 ) ;

$p5 = Right ( Left ( $Integer ; $IntLength - 12 ) ; 3 ) ;

$p6 = Right ( Left ( $Integer ; $IntLength - 15 ) ; 3 ) ] ;

$plusminus &

Choose ( GetAsBoolean ( not IsEmpty ( $p6 ) ) ; "" ; $p6 & thousandSeparator ) &

Choose ( GetAsBoolean ( not IsEmpty ( $p5 ) ) ; "" ; $p5 & thousandSeparator ) &

Choose ( GetAsBoolean ( not IsEmpty ( $p4 ) ) ; "" ; $p4 & thousandSeparator ) &

Choose ( GetAsBoolean ( not IsEmpty ( $p3 ) ) ; "" ; $p3 & thousandSeparator ) &

Choose ( GetAsBoolean ( not IsEmpty ( $p2 ) ) ; "" ; $p2 & thousandSeparator ) &

Choose ( GetAsBoolean ( not IsEmpty ( $p1 ) ) ; "0" ; $p1 ) &

decimalSeparator & $paddecimal

)

Edited by Guest

The mistake here is using text functions on a number. The number is converted to text, and the conversion does use scientific notation where it thinks appropriate.

However, this has all become obsolete ever since this cat has been let out of the bag:

http://fmforums.com/forum/showtopic.php?tid/195085/post/289577/#289577

Edited by Guest

  • Author

That is really great, many thanks :

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.