Scientific E notation: How to get it
Monte Goulding
monte at sweattechnologies.com
Mon Sep 23 06:45:49 EDT 2013
On 23/09/2013, at 8:39 PM, "FlexibleLearning.com" <admin at FlexibleLearning.com> wrote:
> Thank you, Monte, but the numberFormat of the output is somewhat
> non-standard...
>
> put format("%E",0.000001234) --> 1.234000E-006
>
> Can this syntax include alternative numberformats?
>
> For example:
> '0.00' --> 1.23E-06
> '0.###' --> 1.234E-06
> '00.0000' --> 01.2340E-06
>
> Just asking as my "%E" syntax skills are sadly lacking!
You can't do quite what the numberFormat can do but you can do stuff like:
%.3E which gives 1.234E-06... if some of the precision was unnecessary then you could strip some zeros before E if you got some.
The syntax is %<optional total length>.<optional precision>E
Cheers
--
Monte Goulding
M E R Goulding - software development services
mergExt - There's an external for that!
More information about the use-livecode
mailing list