Re: A missing (?) function: exponentfp(x)
Bill Allombert <[email protected]> Mon, 16 Sep 2024 19:13:39 +0200
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <ZuhnQzo7_Wf04Pjq@seventeen> |
On Mon, Sep 16, 2024 at 10:06:07AM -0700, Ilya Zakharevich wrote: > On Sat, Sep 14, 2024 at 12:31:57PM +0200, Loïc Grenié wrote: > > In gp you can cheat > > > > ? install(dbllog2,lG); > > ? install(dbltor,L); > > ? flog2(x)=dbltor(dbllog2(x)); > > ? my(il2=1/log(2));setrand(1);for(i=1,10^6,log(random(1.)<<4)*il2) > > cpu time = 3,868 ms, real time = 3,868 ms. > > ? setrand(1);for(i=1,10^6,flog2(random(1.)<<4)) > > cpu time = 655 ms, real time = 656 ms. > > On my Intel x64 CPU, this gives > > *** in function flog2: dbltor(dbllog2(x)) > *** ^------------------ > *** attempt to change built-in dbltor. > > Do not know whether it is related to the ABI problems Bill wrote > about… This is unrelated. You probably did the install() after having defined flog2(), so they were not taken into account by the bytecode compiler when compiling flog2 Cheers, Bill.