iDevOS CALC "CBRT" Command

Get the cube root of a value.

Description

CALC( y, a, "CBRT" );  // y = cbrt(a) = cube root of a

This command returns the value y which is the cube root of a.

Parameters

y
Calculation result.
Parameter type: entity name of a numeric variable (eg U8, S32, FLT3 etc).
a
Input value.
Parameter type: immediate number, or entity name of a numeric variable (eg U8, S32, FLT3 etc).
"CBRT"
CALC command operator.
Parameter type: immediate string.

Examples

Example 1

VAR(d,  0.0,   FLT4);
VAR(a1, 327.6, FLT4);
VAR(a2, 64,    S32);

CALC(d, a1, "CBRT"); // d = 6.8936
CALC(d, a2, "CBRT"); // d = 4.0000