Re: sumdigits(n,B) doesn't refuse B < -1
Bill Allombert <[email protected]>
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <ZTathoPsI4C8LAx1@seventeen> |
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