Ruud H.G. van Tol on Wed, 29 Nov 2023 22:41:21 +0100


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

Re: log_int_rat



On 2023-11-29 22:15, Ruud H.G. van Tol wrote:
[...]

I was surprised by this performance difference:

? localbitprec(10000); my(L = 1-log(2)/log(3)); [ 1 + floor(n/L) |n<-[0..10^5] ];
cpu time = 1,061 ms, real time = 1,064 ms.

? localbitprec(10000); my(L = log(2)/log(3/2)); [ 1 + n + floor(n*L) |n<-[0..10^5] ];
cpu time = 80 ms, real time = 82 ms.

What would explain that?

-- Ruud