skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Logarithm (Base x)
 

Try Corticon Now

Logarithm (Base x)

SYNTAX

<Number>.log(<Decimal>)

DESCRIPTION

Returns a Decimal value equal to the logarithm (base <Decimal>) of <Number>. If <Number> is equal to 0 (zero) an error is returned when the rule is executed.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

The following Rulesheet uses .log to calculate the logarithm (base 7.0) of integer1 and assign it to decimal1.

SAMPLE RULETEST 1

A sample Ruletest provides results for three examples of integer1. Input and Output panels are shown below:

SAMPLE RULETEST 2

Another sample Ruletest for three examples of integer1 where one example is equal to zero (0). The resulting error is illustrated below.