Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!dimacs.rutgers.edu!rutgers!cunixf.cc.columbia.edu!cunixb.cc.columbia.edu!amh From: amh@cunixb.cc.columbia.edu (Adam M. Heyman) Newsgroups: comp.lang.scheme Subject: Are numbers self evaluating? Message-ID: <1991Feb26.205210.21352@cunixf.cc.columbia.edu> Date: 26 Feb 91 20:52:10 GMT Sender: news@cunixf.cc.columbia.edu (The Daily News) Organization: Columbia University Lines: 53 While fooling around with MIT Scheme 7.1, found this interesesting phenomena. Apparently, multidigit numbrs are not self evaluating, they need to go through adds (+) and multiplies (*) in order to evaluate. What follows is an edited journal of a session: (trace +) Automagically impurifying an object... ;;What the heck does this mean? ;No value 1 ;Value: 1 10 [Entering #[compound-procedure 2 +] Args: 10 0] [10 <== #[compound-procedure 2 +] Args: 10 0] ;Value: 10 123 [Entering #[compound-procedure 2 +] Args: 10 2] [12 <== #[compound-procedure 2 +] Args: 10 2] [Entering #[compound-procedure 2 +] Args: 120 3] [123 <== #[compound-procedure 2 +] Args: 120 3] ;Value: 123 etc. This phenomena holds also for negative numbers, i.e. only -9,-8,...0,...9 are evaluated without supporting math functions, and can also be seen by tracing * instead of +. If anyone out there has some insight as to why Scheme is doing this, please let me know. I would be very interested to learn why it decomposes numbers, and then builds them back up (from the point of view of the user, I realize that the decomposition is probably just the way the input handler functions, but this is pure conjecture), especially since numbers in scheme are supposed to be self evaluating. Adam Heyman amh@cunixb.cc.columbia.edu