iDevOS CALC "LOG10" Command

Get the base-10 logarithm of a value.

Description

CALC( y, a, "LOG10" );  // y = log10(a) = base-10 logarithm of a

This command returns the value y which is the base-10 logarithm 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).
"LOG10"
CALC command operator.
Parameter type: immediate string.

Examples

Example 1

VAR(d,  0.0,  FLT4);
VAR(a1, 1.27, FLT4);
VAR(a2, 8,    S32);

CALC(d, a1, "LOG10"); // d = 0.1038
CALC(d, a2, "LOG10"); // d = 0.9031