Date: Sat, 27 Jan 2001 14:56:05 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: Salvo Bartolotta <bartequi@inwind.it> Cc: questions@freebsd.org Subject: OT again: Re: hexidecimal literacy Message-ID: <14963.13797.116165.382738@guru.mired.org> In-Reply-To: <20010127.20140200@bartequi.ottodomain.org> References: <14963.8033.752142.149320@guru.mired.org> <20010127.20140200@bartequi.ottodomain.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Salvo Bartolotta <bartequi@inwind.it> types: > >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< > On 1/27/01, 8:20:01 PM, Mike Meyer <mwm@mired.org> wrote regarding Re: > hexidecimal literacy: > > Mark B. Withers <mwithers@one.net> types: > > > Oh gosh! > > > I thought I understood it before, but looking at it like this > > > simplifies it dramaticly!! > > Just remember that this applies to interesting bases like 0, 1, Pi and > > negative numbers :-). > Hmm, I am afraid you are exaggerating a bit :-) Actually, I'm not. I'm pretty sure this was from Knuth, back when I was an undergrad. Unfortunately, my books are all in storage, so I can't check on it :-(. > <nit-picking mode> > 1) a positional notation making use of negative bases looks very > awkward/impractical (you would have to utilize negative coefficients); > OTOH, when working with such a positional notation, you are supposed > to be working on N (ie the set of the "natural" numbers, or positive > integers); and to add to all this, there are a number of approaches to > the "construction" of N itself (Peano's, Cipolla's, the set theory > with all its subtle problems... cf Bourbaki[sm]) > > 2) Pi, as "e" ~ 2.71828182..., is <gasp> a **trascendental** irrational > number (!). I let you guess what kind of coefficients you have to use > to generate integers. > </nit-picking mode> You seem to be focused on generating N. If that's the goal, then using negative (or any base less than 2) or irrational bases is indeed problematical. However, that doesn't change the fact that a string in some base has a single, fixed value even for negative and transcendental bases. As such, they can be safely used to represent numbers, and make a perfectly valid base. Ok, maybe I exaggerated a little. The v7 version of dc interpreted an output base of 0 as base one, using the the bell character for output. I note with some sense of loss that the GNU dc/bc pair limits 2 <= ibase <= 16, and 2 <= obase. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14963.13797.116165.382738>