Skip to main content

root

Finds root of yth degree of an argument X.

Parameters

  • X (number)

    The number to calculate the root of.

  • Y (number)

    The root degree.

  • DECIMAL PLACES (number)

    Optional. The number of decimal places for the result.

    Default: Takes the number of decimal places from the default number format pattern — unless all numbers used in the calculation have been formatted identically (using a formatting function), in which case the result is displayed using that formatting.

  • STRIP TRAILING ZEROS (Boolean)

    Optional. Whether to strip trailing zeros from the result (true) or leave them in place (false).

    Default: Strips or keeps trailing zeros based on the default number format pattern — unless all numbers used in the calculation have been formatted identically (using a formatting function), in which case the result is displayed using that formatting.

Important

In legacy projects, the default for DECIMAL PLACES is 7, and the default for STRIP TRAILING ZEROS is true. For more about legacy projects, see Legacy behaviors.

Examples

Assume the settings in Settings > Number and Currency are:

Setting

Value

NUMBER FORMAT

#,##0.##

If the optional parameters are unspecified, the project setting applies.

ATL in Script

Result

[[root(2, 2)]]

1.41

Use the third parameter to define the number of decimal places.

ATL in Script

Result

[[root(2, 2, 3)]]

1.414

[[root(2, 2, 5)]]

1.41421

Set the fourth parameter to false to include trailing zeros.

ATL in Script

Result

[[root(27, 3, 5)]]

3

[[root(27, 3, 5, false)]]

3.00000