bc spustit takto: bc -l
# A function to return the integer part of a number define int(number) { auto oldscale oldscale = scale scale = 0 number /= 1 /* round number down */ scale = oldscale return number } # Use the fact that number^exponent == e^(exponent*log(number)) define power(number,exponent) { if (exponent == int(exponent)) { return number ^ exponent } else { return e( exponent * l(number) ) } } power(27, 1/3) 2.99999999999999999995