toExponential Summary Formats the double 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 double value formatted using exponential notation. The double 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. Examples Basic Usage 12345678import System; System.Double x = new System.Double(100d);System.Double y = new System.Double(1000d);System.Double z = new System.Double(10000d);Console.log(x.toExponential()); // "1e+2"Console.log(y.toExponential()); // "1e+3"Console.log(z.toExponential()); // "1e+4" Basic Usage 1234567import System; System.Double x = new System.Double(100d);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