toExponential Summary Formats the integer value using exponential notation. Signatures Click on a signature to select it and view its documentation. public string toExponential() public string toExponential(int fractionDigits) Usage public string toExponential() public string toExponential(int fractionDigits) Returns The integer value formatted using exponential notation. The integer value formatted using exponential notation. Parameters fractionDigits The number of digits to appear after the decimal point. Description The number of digits appearing after the decimal point will be the number of digits required to uniquely identify the value. The number of digits appearing after the decimal point will be the number of digits specified for the argument. System.Exceptions.OutOfRangeException will be thrown if the supplied argument is not an integer between 0 and 20 (inclusive). Examples Basic Usage 12345678import System; int x = 100;int y = 1000;int z = 10000;Console.log(x.toExponential()); // "1e+2"Console.log(y.toExponential()); // "1e+3"Console.log(z.toExponential()); // "1e+4" Basic Usage 1234567import System; int x = 100;Console.log(x.toExponential(0)); // "1e+2"Console.log(x.toExponential(1)); // "1.0e+2"Console.log(x.toExponential(2)); // "1.00e+2"Console.log(x.toExponential(3)); // "1.000e+2" Share HTML | BBCode | Direct Link