I must to write a algorithm that exponentiates a base (integer or float) in a integer or float argument. I wrote this algorithm for Deluge (zoho.com), but it can only use integer exponents:
float math.potencia(float base, int expoente) { if(expoente>0) { base = base * thisapp.math.potencia(base, (input.expoente - 1)); } else if (expoente == 0) { base = 1; } return base; } (Deluge doesn't have a potentiation operator or function). Thanks!