The operator ** calls a decimal implementation of the function power.

Notice: the exponent is an int.

-- read

a ** b

-- as

xxx(a, b)

-- where xxx is the

FUNCTION xxx(x DECIMAL, y INT) RETURNS DECIAMAL

Decimal functions are usually slow compared with the same function using float or double parameters.

Compare the performance of decimal functions with the performance of float or double function before integrating the math coprocessor x87 into the CPU. In those days (before 80486, launched April 1996) those function were implemented by software.

Don't use the operator **.

Use util.Math.pow(x FLOAT, y FLOAT) returning FLOAT

Rene