Re: bug in (log)

2022-11-10 Thread Daniel KochmaƄski
Hey, sorry for taking my time with the response. While indeed conforming, I've added a separate code path for ratios. I'm conditioning on the integer length (like SBCL does). static cl_object ecl_log1_ratio(cl_object x) { cl_object num = x->ratio.num; cl_object den = x->ratio.den; if

Re: bug in (log)

2022-07-10 Thread James Cloos
i should have realized this even before noticing ecl's limitation for logs of ratios, but at least i finally did since i'monly using log to find the exponent for an arbitrary precision replacement for format's ~e, it works to truncate first. so i ended up with this: (defun ilog (n (base

Re: bug in (log)

2022-07-03 Thread Raymond Toy
On Sun, Jul 3, 2022 at 8:10 AM James Cloos wrote: > it looks like that bug only harms ratio. bignum integer seems to be ok. > > so aworkarount is, in the caseof a ratio, to take the difference of the > logs of the numerator and the denominator. > This is basically what cmucl does. But you

Re: bug in (log)

2022-07-03 Thread James Cloos
it looks like that bug only harms ratio. bignum integer seems to be ok. so aworkarount is, in the caseof a ratio, to take the difference of the logs of the numerator and the denominator. -JimC -- James Cloos OpenPGP: 0x997A9F17ED7DAEA6

Re: bug in (log)

2022-07-03 Thread Stas Boukarev
This is permitted by http://www.lispworks.com/documentation/HyperSpec/Body/12_acc.htm On Sun, Jul 3, 2022 at 12:10 AM James Cloos wrote: > > (gitlab is uusable; i have to report here.) > > ecl 21.2.1 gives: > > > (log 1/6319748715279270675921934218987893281199411530039296) > > Debugger received

bug in (log)

2022-07-02 Thread James Cloos
(gitlab is uusable; i have to report here.) ecl 21.2.1 gives: > (log 1/6319748715279270675921934218987893281199411530039296) Debugger received error of type: DIVISION-BY-ZERO # Error flushed. whereas other cl's (i testyed sbcl and ccl) give results like: ? (log