question

Diana Lubow avatar image
2 Likes"
Diana Lubow asked Matthew Gillespie commented

Using scientific notation

How do you use scientific notation in Flexsim? I've tried using 6.8e17, 6.8e+17, and 6.8x10^17, but none worked. I need to do a duniform distribution that goes from 1 to 6.8e17.

FlexSim 16.0.1
number distributionduniformscientific notation
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Logan Gold avatar image
2 Likes"
Logan Gold answered Matthew Gillespie commented

FlexSim does not parse any scientific notation characters, so if you want to do something like 6.8e17, then you would need to use the pow() command where the first parameter is 10 and the second parameter is the exponent. Then, multiply that number with the significand. So it would look something like this:

6.8 * pow(10, 17)

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

FlexSim 2017 Update 1 (just released in beta [2017-03-08]) adds the following feature:

  • Improved scientific notation for literals in FlexScript.
0 Likes 0 ·
Diana Lubow avatar image Diana Lubow Ben Wilson ♦♦ commented ·

Can you provide an example, please? Thanks!

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Diana Lubow commented ·

Scientific notation was actually added in 17.0 but requires a decimal point:

3.4e3    //3400

In 17.1 it was improved so that the decimal point isn't necessary:

3e3     //3000
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.