Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this Page

Table of Contents
maxLevel2
excludeAdditional Resources|Related Links|Related Information

toExponential

Description

Returns a string representing the Number object in exponential notation.

This is similar to the JavaScript .toExponential().

Syntax


Code Block
object.toExponential(optdigits)

where optdigits is an optional integer to specify the number of digits to appear after the decimal point.

Example

Expression: Math.random().toExponential()

Result: 7.650264534953171e-1


Expression: Math.random().toExponential(2)

Result: 7.65e-1

toFixed

Description

Returns a string representing the Number object using fixed-point notation.

This is similar to the JavaScript .toFixed().

Syntax


Code Block
object.toFixed(optdigits)

where optdigits is an optional integer to specify the number of digits to appear after the decimal point.

Example

Expression: $Number.toFixed()

Result: If $Number is equal to 0.89473, the result is 1.

toPrecision

Description

Returns a string representing the Number object to the specified precision.

This is similar to the JavaScript .toPrecision().

Syntax


Code Block
object.toPrecision(number)


Example

Expression: $Number.toPrecision(2)

Result: If $Number is equal to 4.2103, the result is 4.2.

  • If a value precision is omitted, the number is converted to a string.

...