LOG10


8.0.9

 

The LOG10 instruction calculates the base 10 log of a value. The instruction uses the following format:

 

 

[label]

LOG10

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A Numeric Variable, numeric Literal, or Expression for which the base 10 log is calculated.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

dest

Required. A Numeric Variable that receives the base 10 log of the source.

Flags Affected: LESS, OVER, ZERO

Note the following:

  1. The result is placed in the {dest} operand.

  2. The {source} operand remains unchanged.

  3. The EQUAL (or ZERO), OVER, and LESS Condition Flags are applicable.

  4. The rounding and truncation rules described in the section Numeric Variables are applicable.

  5. If the environment variable PLB_ROUND is present, the result is rounded in accordance with the ANSI PL/B specification. Otherwise, the source operand is aligned and rounded, as applicable, to the destination operand's format.

  6. This instruction supports the mixing of variable types (FORM and INTEGER).

  7. Enhanced Array processing is supported.

  8. LOG10 is not supported by the PLBCE runtime.

 

 

See Also: Example Code, Mathematical Instructions

 



PL/B Language Reference LOG MODULO