Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: Alan@lcs.mit.EDU (Alan Bawden) Newsgroups: comp.lang.scheme Subject: Logical operations on integers. Message-ID: <9104110124.AA11779@august> Date: 11 Apr 91 01:24:53 GMT References: <9104090602.AA06996@cymbal.reasoning.com.> Sender: alan@ai.mit.edu Organization: The Internet Lines: 27 Date: Mon, 8 Apr 91 23:02:43 PDT From: Scott Layson Burson ... What would be the sensible semantics for unsigned integers given that they can be of arbitrary precision? (It turns out that there is a surprisingly reasonable answer.) I'm not confident that there is a -unique- sensible semantics, but the 2-adic integers is certainly -one- sensible semantics. Indeed, it would be easy (in principle) to extend the domains of the logical operations to include not just all real integers, but all real rationals of the form p/q where q is odd. It might be harder to support the full 2-adic ring of integers, which includes things like sqrt(17). While I -can- compute (LOGIOR 2/3 3/5) = -7/15 I don't actually know if (LOGIOR (SQRT 17) 3/5) corresponds to any real number or not. (I was tempted to say that if it did, it would have to be irrational, but I now realize I can't even show that!)