Natural Logarithm

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples > Perform Math operations >

Natural Logarithm

Overview

This function returns the natural logarithm of a number.

 

CHelper.Math.Ln(Number)

 

The parameter of this function can be defined as an XPath, variable or number.

 

Considerations

The input parameter must be double.

The supported attribute types to use as input XPath parameter (or Xpaths stored in variables) are: integer, currency, float, real.

The function returns an error if the input parameter is less than or equal to 0.

The function returns an error if the input parameter is either too long or undefined.

Use the IsNaN function to validate the parameter is a number.

 

Example

A Laboratory uses Bizagi to manage its medical researches. In these researches the laboratory commonly has to perform estimations of bacterial colonies growth. The time a colony spends to achieve an expected growth is estimated using the following expression :

 

Math14

 

Where No is the initial population, e is the base of natural logarithms, k is a constant and N is the population at the t time.

 

To calculate the time to achieve the expected population of bacterias in Bizagi you can use the Ln function:

 

Math15

 

//Obtain the parameters of the formula in variables

No = <LabResearch.Bacteria.InitialPopulation>

N = <LabResearch.Bacteria.Finalpopulation>

k = <LabResearch.Bacteria.Growthconstant>

//Apply the formula to obtain the time to achieve the expected population

<LabResearch.Bacteria.TimeofEstimation> = (CHelper.Math.Ln(N / No) / k);