This function calculate the power of a number by n.
double dg_fpow(double number, int pow);
double dg_fpow(0.567, 5);
double dg_fpow(double number, int pow)
{
double result = number;
if (pow == 0)
return 1;
if (pow > 0)
for (int i = 1; i < pow; i++)
result *= number;
else
result = number / dg_pow(number, 1 - pow);
return result;
}