Square Root

<< Click to Display Table of Contents >>

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

Square Root


This function obtains the square root of a number




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



Input parameters 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 either too long or undefined.

The function returns an error if the input parameter is negative.

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



A company uses Bizagi to manage their logistics processes. One of these is Inventory management. In one of the activities of this process it is necessary to calculate the economic quantity order of a product. This quantity can be obtained by using following formula:




Where Q* is the optimal quantity to order, D is the annual demand of the product, K is fixed cost per order and h is the annual holding cost per unit.


This quantity can be calculated in Bizagi by using the Sqrt function:




//Obtain the parameters of the formula in variables

D = <InventoryManagement.Demand>;

K = <InventoryManagement.OrderCost>;

h = <InventoryManagement.HoldingCost>;

//Calculate the economic quantity order

<InventoryManagement.EconomicQuantityOrder> = CHelper.Math.Sqrt(2*D*K / h);