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
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!