Bookshelf Home | Contents | Index | PDF |

Siebel eScript Language Reference > Siebel eScript Commands > Conversion Methods > ## toExponential() MethodThis function returns a number converted to exponential notation with a specified number of decimal places in its mantissa. ## Syntax
## ReturnsThis function returns the number contained in variable numberVar, expressed in exponential notation to len decimal places. If len is less than the number of significant decimal places of numberVar, then the function applies standard rounding (round up for 5 or greater, else round down). If len is greater than the number of significant decimal places of numberVar, then the function pads the extra places with zeroes. If len is negative, an error is thrown. ## UsageThis function allows you to express numbers in exponential notation with a desired number of decimal places. Exponential notation is generally used to express very large or very small numbers. Because the mantissa of a number expressed in exponential notation is always exactly one digit, controlling the number of decimal places is also a means of controlling the number of significant digits in the number. The justified accuracy of the number may limit the number of signficant digits. ## ExampleThe following uses of toExponential() yield the results shown. var num = 1234.567 var smallnum = 0.0001234 ## See Also |

Siebel eScript Language Reference |