toExponential

Summary

Formats the double value using exponential notation.

Signatures

Click on a signature to select it and view its documentation.

Usage

public string toExponential()

Returns

The double value formatted using exponential notation.

Description

The number of digits appearing after the decimal point will be the number of digits required to uniquely identify the value.

Examples

Basic Usage
1
2
3
4
5
6
7
8
import 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"

Share

HTML | BBCode | Direct Link