Karim Belabas on Thu, 09 Mar 2023 10:03:46 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: logint() bug?
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Thu, 9 Mar 2023 10:02:17 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1678352531; c=relaxed/relaxed; bh=x9L0sSdwNoVat8YY7uHVk71VfWLVMT0CBBKL0XvH8EQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=18XbSJWmB37A1Ys+X2XeI0zIjcjK4VrjenmvqgnHOlskATxDFvfr4DhNDBziPhZGUVVXkHAMLeBgEKsPMCm26H9IuEhylZ4/PajDvdiu3qIOVesEEAh5twEz/ISk7cioDbG4PSfKJWry24HL8IY7IpdmVt+tOEjY4Q2aBKuHyL+5cdG3y4K9O4Dfv8nMTq6LSTNLjQZo5gfjlhPKtww5Ize7W3vBwYLuii0oRwkThwUzaIrVIh6DoIRQJaApohSzuZ8vMzFzZrwcZq856r1814HDd1EXVqk7OSIS3DSewd+0z8cwRXAXDjwdbPoxGzKuEIUY/vGvDhuuy1ZSVdOukW+eLLYNqZFks0BA0abKKHsKF0NzP2pGOFiGdaKa31c2vBcGKNVC0rUZ+dEGM7XsWdPorMdwjbYCTtUCsZi06F/Sbv396jJC6vURWNRx6zx/p3PkwbdFk1csxs96RyMTCrMhdbKy8zl5MXG+9QfDgUcYTnmBpEVn3xricd6IxHWjrkd+HglI6HCWe3Es3z8CtUy+CUW7ZsX1v6wyMgl/8M2Cr4nN4x7gmFsoBq74ahz2HXHr91wVJ5A4RCxzahD9S8VktWUG17GezQciopxFB/wfHoHuCynpSTsBA2QizCQh7CeNZYAtuc7q89n0/Oh5Ct4XbK5Tl9CmwOEdqFlsdis=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1678352531; cv=none; b=WKNMKZfo9MfsF9QuLHLcNJVdSZxXzjTJoHu2QCcC6lN/4R/bxIIA93z9OhLTXkcHcaSkfLN6TpA/TPViQyZEBjwghNaVZXVbvR4V4yldxWWjtbwswWYYEX0u/KVUvFRbj4SLGtXZGmBAojbAXifJVd9lWJ2xxeAq9D+UHgjYmNr1sPmVKHqNf2DXmd1Cmq1QE5ZLzJGgBtxWjKyYpsyKN9BrLLI3IdGCkDaAbxf1E/XVcXujxpLOYSr3ntpYR9bMhz9EVYDmjqBx0aO9nixI17YHHVTkcbRyA3VonBmgcVTox7OiCiW4MF5x9M6nzJ6E9PipfA6Wj0KoYO/oViwBoUDjzBR+wT8qDfmXlkSJpXqE0b41uze8DL//8UUxoj7W3KNElcHeHuKHfFICB2PiZ3YiHVwcTGxmVkEfBxnR3kLSMAu8fqLXgMLTB1eMHe48OnMnGa9ZUZQsadYzozEekBa+mpjcb4x923Apgs98EvEomguQazSM6TU0emWv1grHAkvYtbiir1NABzC1paVE1LezA2pNgOE5SVpnLU2+82BsGDH6GL+uqgL2zDQkyHbtGE4ouvkkgTNB5kfttbNXOIwUzEcs/cPrAKOhq10raYPZ+6ubQu//aHpC7Z45uZaxZBojLVcnnTO2zBuR8rDEgZuXHrUp3qHysTtVoKTMaQE=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Thu, 09 Mar 2023 10:03:46 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1678352531; bh=x9L0sSdwNoVat8YY7uHVk71VfWLVMT0CBBKL0XvH8EQ=; h=Date:From:To:Subject:References:In-Reply-To:From; b=JHAWYGVk6XJLshAMCdrzLQotaqvDuTbSVVpZQ6UwetrdmnLn2H9v7fXQdeEyPLMK0 QtSmwNVMl22AlP4meRmSx6z3Ak4W5lviEgkzI1BbgjFzWGIgnjytY6CO5Rpxkn/eNE ggKlx6Ve/GShAD3lMLp2CpQGssxqw9GOOCaZYn+73C3GO81EeUKhV09jomF7gfEUHh 7Ze0RzxTwa3bMeRImtyDXMMHNHpTqcIY1SaNZy/XlfYGCFGHAgjmWneP220DzCoIOw ryRxUjcDIzVQFbs+dW+Yh+iBfedMaqMQoaYNtjlD4T5bee647l/piIQnDWfPaxFAOx Tml9oT21zhizO58nJ4q5sJl1Ek4oBAY70tcInfGpvPBR+O9KAhMTd0MsF7kXqd2iz1 D64YtqzF/ItbJ2ud12IetVCjfKGDNaOEYyi0JNLW627GNRrLS17rPOhuLNr/dS4ySH hWWhUuD71aUj6GzvNyIdtnfyLiEk9McpoELaJYKtTk2b84jG/K2H5C8QizMjl5CHfn 1eQHg488r5fqy3jjNZOxgEPL/x9pYj7oEY8Gvehalh6nWtrhHLKLfLlwsvjDQK5Wqm pZo+g0d50SDMFFe5KQsGgyZ6+/6+F3eye4w/aOhc1StizWIMb8THggUaEw6HxepnIR SVezYeC1HlMS92mdx1+HHTpo=
- In-reply-to: <ZAmeUzVA3bp5n55r@seventeen>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAJkPp5M930tybTN9LCgCqTP2RAjc0_ShkgED0GKHLscS-0jH6g@mail.gmail.com> <ZAmeUzVA3bp5n55r@seventeen>
* Bill Allombert [2023-03-09 09:52]:
> 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...
Yes, the documentation is faulty: logint(x, b) should require
x >= 1 real number (instead of x > 0).
It may work in other cases, but the implementation doesn't support it
(and there's no way to support it efficiently)
I'll fix the doc.
Cheers,
K.B.
--
Pr Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
`