KB-31905: Working with a number’s nth root.

Question:

How can I work with a number’s nth root in E3?

Solution:

To work with square roots, use VBScript’s Sqr function.

Example of script:

Dim MySqr
MySqr = Sqr(4)   ‘ Returns 2
MySqr = Sqr(23)  ‘ Returns 4.79583152331272
MySqr = Sqr(0)   ‘ Returns 0

For roots of higher degree (3,4,5,…), you must raise the radicand to the result of the exponent of the radicand divided by the radical’s index.

Examples:

Cube root of 9 = 9^(1/3)
Fourth root of 9 = 9^(1/4)
Fifth root of 9 raised to 6 = 9^(6/5)

NOTE: You must use parentheses with the fraction so that the calculation returns the correct result!

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *