Bill Allombert on Mon, 23 Oct 2023 19:29:49 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: sumdigits(n,B) doesn't refuse B < -1
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: sumdigits(n,B) doesn't refuse B < -1
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 23 Oct 2023 19:29:42 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1698082186; c=relaxed/relaxed; bh=eAkFxCH8SVeKhcX3mpsz5GUNLAspHJ1j6vYKAMCPIDc=; 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=Q3y0u4c271Axl+af3HifV8wdE+Hmj8HawMAGlhZNJXC6pj3EeUq9ttjVJ4F8Im/AhQzJUizB2uPw8FPMiYae4H1Li90dsAu0VsbynzTjRNzypLy+n6RgkrEGWX6N1pn7HJExfcHGLRBLoxjtDXwGPhlMmKZQU49fSV/3lvH/cQPEZC5E1sx5b9dS/9evRvRGFld3E63qQR+ig98+aK2ML7en+jRBdgD8zxzX1kL4U+0GVnWqPToWf+riVfiLt4qEMT1y398XDZbP4UqV9Os334821OVBlPU54/uPkYUNFa2VwVYdY3udhNRMbSFcWC3+ZfRDDNQXjvUW+GnlBsr6p8SxIIKqH/B5kgobeqDuVvfOdMB5RIhizbLg38wcnnOlWbuxpMI0QmAOYb0O10/qs7wzZDsKDc/iQGuawFpIOqhhQwGPlwAlQ0mYjue80A/HpmXaWu0KQQ9EHw/MVlgkzKBKk/SP8aRlIqsxjfiAcFrWKYRovVh61QlrReFC/E5bS+znZUCttvxAwx7mG5FrZVdXP/XJaH2sKNc1hwKFhEc9c05OMxccY5hIHXbVA1+unzRSwr4DUXDaD7fuZgVXsh/9QuaeIE02rTJ7LHPQf8jIITnsRzQVl0F8lxb9iAx58Rgu02RzWjjEEiAMnEokKL3NYSdwv1cQL21Gw/5rYCw=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1698082186; cv=none; b=m7R9agKl6+UgmOXM7l0y3neDqMNCTx5OT2zByLLwW95PBGfJzwtV/YeuTIGxYFFwqKqGVF9BTqrDtIt8m1TjgU4YfjsMl/VTZWepX2q3Sdk477G4Ea5giOsNqXw+clNeqHz2bWeSOVNnhiS9KHo5cqNINCovt5BemCYUCJ/cBinvnHBkIyXHu9psZae0A7bMMlDAdjfy9eI3T/TR/LmxOMgUQC5WVcduv8XuU2DNQkAy/pqKff84vVgni+fYXvYb9FLQqUP+dHtaD/4tU6j302jeOiBH7A5HTYlWYGaV3YwP/5M2jtO+HJM9EejTKJIb59EhaonQE2xcQ98ssxBlhAxHikjKutKZDb4cePLP9bCC8e1DgcMk5n1aSQGy0UvmwtZWdKyScVr7UNA5kn5yo7n6LTosr3C8iGP5oa9RFlrVEnwQHtBXzxq8/EXk2dbUEfKHfiVTkiSm57AuWlRaWVEB6FjTuhae0byTy9Y/QUjumdLo+07oY5J787kwp3vhWJlu+7HcbuvIto9FFBfyCOtmyyvvr6ws+hMktGLRXSeVWln+t3xVs9MUvoxqvnRHv5RD6hM/HZpg9dm0CnLnSEJANVHArUSBzjxE6mVK4p3sppX1WyksaOGTG+6zjFH6hU2H94SP5iwG3IyXV+evbX6nv8rQLDcRZgicLCtUHz0=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 23 Oct 2023 19:29:49 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1698082186; bh=eAkFxCH8SVeKhcX3mpsz5GUNLAspHJ1j6vYKAMCPIDc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=Gtjk/LAUU9KKLgWqOmEOtxBekEPIHzA2iZPiM+xWDxSA76GUE0vkFIKLrLteoqrs3 eOR6ysCzAAZAt9iUybenTXaeSmV3WoD6qxeIyHaUNJ94yXmQusprdzizXdOisSLg9P 42zlYopQNAw5+IZL3FIfDbIQufLKxS6F/9OmocTJjchsGp+LzT6jtCxmEPdog3KGdX 8hYxbk68TX47+A4mbj18J2dgLJgQAZEniqJUvmyVCiRBGVNxsP8+2z6nRtf9VPnt6A 1gnRY4oPbhbwACd38SceWdiZ9oN71wCbO2b6tTDhiF7xxoRFgpEC0XAwwqkQjV161u j3ZB8sM5tiMuafiDUGc0oP8IG6QQz0n3lHX7qTCL5qRLnq1xVgIIZIMpWRyvYW4jL7 +IIngf2GrfhnZny+xg182CPcdrgD7AqcG71amKpOaeiw0nGXkhnTZEEMH/j+0/vBAk yVhWxs9f7Npfr82XRo75Q4OZUXgDJHrWmkX9SjB9HMLJ+NQRCXBcOElxAT/et3i5E+ kdAr9jLqSyLwb3grgi5tvF5nVAyB+QRz+Lr2sXmegmC/1JoCEvmSju3VKGTdGc9wM3 uoZAw8jHtHHD2Zsel2JBmhaOdCmdkexITdVbzKo/o65FQiO98dMubZ7xiRRDtXJ1Ax J3nioYoSBgvjgSRGbB7JhNt0=
- In-reply-to: <ea1efe92-0631-4bab-b934-f3d7878376a0@isolution.nl>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <ea1efe92-0631-4bab-b934-f3d7878376a0@isolution.nl>
On Tue, Oct 17, 2023 at 09:29:59AM +0200, Ruud H.G. van Tol wrote:
> ? sumdigits(12345,-4)
> % 5
>
> Expected:
>
> *** at top-level: sumdigits(12345,-4)
> *** ^------------------
> *** sumdigits: domain error in digits: B < 2
> *** Break loop: type 'break' to go back to GP prompt
Hello Ruud,
I have changed GP so that now:
? digits(12345,-4)
%2 = [3,0,1,3,0,2,1]
? sumdigits(12345,-4)
%3 = 10
which fixes this discrepancy!
Thanks for reporting this problem!
Bill