Ruud H.G. van Tol on Tue, 17 Oct 2023 09:30:09 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
sumdigits(n,B) doesn't refuse B < -1
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: sumdigits(n,B) doesn't refuse B < -1
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Tue, 17 Oct 2023 09:29:59 +0200
- Delivery-date: Tue, 17 Oct 2023 09:30:09 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1697527802; bh=L9eUYiTZ8u+wE8bEAyne3GaEt1Yi2Z3N5tqLjiz2S+U=; h=Date:To:From:Subject:From; b=EwUTTlf8RjlAeJyYCc1GsA6Jf7NDC8RpZVigwRaoQDep80UK235q7GQiBN6zhJwck R0I8x7TJoJ/hyqI12hyGK/PjSbQLcO6XC88UpQxiTGUm7mW57CuVOmwI0l9laFpspB QF5PgSambnngQTRl3YDWSmgoBQbCCa2EeMzX0UFQb2so3LGR9jnJApMdoo8DAquhf9 pQ0cBN9FBtThKi+zMCbG/VLmBI/aoZMhDczVAHKQyM+hVOt4gEXRfJMVc4PR3mwMrL Zb8LMLPSImIpDX8wEUeBU5Kg5iuQeTOpVkiRI+bMuo4o2CbqfgusUCiCGfysoQlijo 8Bc/SVWTBUPpA==
? 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
break>
-- Ruud