Aurel Page on Wed, 18 Sep 2024 10:38:12 +0200


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

Re: A missing (?) function: exponentfp(x)


Dear Ilya,

How about something like this?

? install("exponentfp","G");
? exponentfp(2^30-1)
%2 = 29.999999998656385002
? exponentfp(Pi)
%3 = 1.6514961294723207175
? z = Pi*2^20
%4 = 3294198.6583305710348142047482656880163
? for(i=1,10^6,exponent(z))
cpu time = 276 ms, real time = 276 ms.
? for(i=1,10^6,exponentfp(z))
cpu time = 312 ms, real time = 312 ms.

Cheers,
Aurel

Attachment: exponentfp.dif
Description: video/dv