I think that math.pow can be removed, but the other ones should remain, even if they're easy to implement.
Em 03/04/2014 19:01, "Coda Highland" <
chighland@gmail.com> escreveu:
On Thu, Apr 3, 2014 at 2:57 PM, Julien Cornebise
<julien.cornebise@gmail.com> wrote:
> Hi Roberto
>
> Naive question, but doesn't math.pow() implements some fast exponentiation
> scheme (for integer exponents) that would be somewhat annoying to recode
> manually? Similar question for the exponentiation by non-integer exponents:
> I'd assume that math.pow() has some smarter way than exp(a log(x)). Or am I
> missing something obvious when you say it would be trivially done without
> the library?
> All the best,
>
> Julien
>
The thing about math.pow is that Lua has exponentiation available
using the ^ operator -- that is, math.pow(a,b) == a^b. The math
library function is therefore a more verbose and (I think) slightly
slower way of expressing the same thing.
/s/ Adam