Convert decimal to scientific notation


            FT_D2E( <nDec>, <nPrecision> )  -> <cNumE>


                <nDec>         Decimal number to convert

                <nPrecision>   Number of decimal places in result.
                     Defaults to 6 decimal places.


                <cNumE>        A string representing a number in
                     scientific notation


                Given a decimal number and the desired precision,
                a string representing the equivalent in scientific
                notation is returned.


                ? FT_D2E( 12.345, 2 )
                  -> 1.23E1

                ? FT_D2E( -12.345, 3 )
                  -> -1.235E1

                ? FT_D2E( 0.00000543, 2 )
                  -> 5.43E-6

 Source: D2E.PRG

 Author: Gary Baren

See Also: FT_E2D()

2 responses to “FT_D2E

  1. Pingback: FT Functions | Viva Clipper !

  2. Pingback: FT Conversion | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.