Bill Allombert on Thu, 09 Mar 2023 09:53:48 +0100


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

Re: logint() bug?


On Wed, Mar 08, 2023 at 10:19:12PM -0500, Max Alekseyev wrote:
> I see the following inconsistent results, while in both cases I expect the
> result to be -1. Bug?
> 
> ? logint(.5,2)
> %1 = 0
> 
> ? logint(1/2,2)
>   ***   at top-level: logint(1/2,2)
>   ***                 ^-------------
>   *** logint: domain error in logint: x <= 0
>   ***   Break loop: type 'break' to go back to GP prompt

This is why my original implementation of logint only allowed integers...

Cheers,
Bill