This function returns the base 10 logarithm of a number.
The parameter of this function can be defined as an XPath, variable or number.
•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 error if evaluates an input parameter that is less than or equal to 0.
•The function returns error if an input array is either too long or undefined.
•Use the IsNaN function to validate the parameter is a number.
A Bank offers multiple products to its customers. When a customer is interested in a CD (Certificate of deposit) it is common that they ask for the necessary time (term) the money has to be invested to achieve an expected amount under the offered interest rate.
This term can be calculated using the following formula:
Where n is the necessary term (in months) the invested amount Po needs to remain invested to achieve the desired amount P at the interest rate i.
To perform this calculation in Bizagi you can use the Log10 function. This function receives a number as parameter:
//Obtain the parameters of the formula in variables
Po = <CDRequest.InvestedAmount>;
P = <CDRequest.DesiredAmount>;
i = <CDRequest.OfferedInterestRate>;
//Apply the formula to obtain the required term
<CDRequest.RequiredTerm> = (CHelper.Math.Log10(P / Po) / CHelper.Math.Log10(1+i));