Ilya Zakharevich on Fri, 15 Dec 2023 03:40:42 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Powers too slow?


It seems that some powers take 2x the time they should take:

  (18:31) gp > localprec(1111111); 1111111^(31/10);
  time = 453 ms.
  (18:31) gp > localprec(1111111); 1111111.^(1/10)*1111111^3;
  time = 234 ms.

I can see that negative powers are also candidates for improvement:

  (18:33) gp > localprec(1111111); 1111111.^(-1/10)*1111111^3;
  time = 312 ms.

(And this is still a bit slower than with 1/1111111.^(1/10).)

  (Needless to say that these are orders of magnitude quicker than
   1111111.^0.1.)

Thanks,
Ilya