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



? 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