'So my question remains: is there a purpose that a function base-n (xby) will accept "foreign" digits without complaining..?' asks Martin Kreuzer. This question and its generalizations pops up now and then. Lets turn it around: is there a purpose complaining rather than accepting a generalization?
Well, I'm not complaining -- it's probably to do with my background, where every function was required to first check whether the parameters were within bounds. I've already learned that some programmers seem to be quite happy with these generalizations. M --- Den søn 10/5/09 skrev Martin Kreuzer <<http://jsoftware.com/cgi-bin/mailman/listinfo/programming>info at airkreuzer.com>: > Fra: Martin Kreuzer <<http://jsoftware.com/cgi-bin/mailman/listinfo/programming>info at airkreuzer.com> > Emne: [Jprogramming] Base Notation > Til: <http://jsoftware.com/cgi-bin/mailman/listinfo/programming>programming at jsoftware.com > Dato: søndag 10. maj 2009 09.21 > > While fumbling around with base > notation, I found > > 5b34 > > 19 > > 5b35 > > 20 > > 5b36 > > 21 > > while I was waiting to see an error message for the > second and third > > case (using digits not in the set for this base, > beyond 0 1 2 3 4). > > This is puzzling me. > > Seems consistent to me. > 5b36 > There are 6 "ones" (5^0) and 3 "fives" (5^1), that makes > 21. > > Obviously you can get 21 using 5b41 too. > > --- > > Thanks, Ric & Devon... > > Let's take another example to make myself a bit more > clear: > > 2b1010 > 10 > 2b2020 > 20 > 2b3030 > 30 > > I'm ready to admit that I can plainly see how this result > is > generated (as Ric pointed out); however I've never come > across any > binary integer of the form 2020 or 3030. So my question > remains: is > there a purpose that a function base-n (xby) will accept > "foreign" > digits without complaining..? > > > > ---------------------------------------------------------------------- > For information about J forums see <http://www.jsoftware.com/forums.htm>http://www.jsoftware.com/forums.htm > --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 090509-0, 09.05.2009 Tested on: 10.05.2009 17:41:57 avast! - copyright (c) 1988-2009 ALWIL Software. http://www.avast.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
