Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!linus!decvax!decwrl!daemon From: daemon@decwrl.UUCP Newsgroups: net.micro.cbm Subject: Floating exception report (!) Message-ID: <5449@decwrl.UUCP> Date: Mon, 6-Feb-84 04:31:34 EST Article-I.D.: decwrl.5449 Posted: Mon Feb 6 04:31:34 1984 Date-Received: Thu, 9-Feb-84 01:33:23 EST Sender: daemon@decwrl.UUCP Organization: DEC Western Research Lab, Los Altos, CA Lines: 33 From: vogon::goodenough (Jeff Goodenough, IPG Basingstoke) I was very interested to read Ray Miller's articles (2 to date) on using the C64's BASIC ROM Floating Point routines. However, I must take issue on a very fundamental point : although a 6-byte floating point format as he describes is used internally, all variables and constants (which is what the user works with) are stored in a 5-byte format. The first byte (at the lowest address) is the exponent, followed by four bytes of mantissa. The sign is held in bit 7 of the first mantissa byte (the 2nd byte of the 5-byte number). Maybe Ray is getting round to this, but I felt I should point this out to avoid (generate?) confusion. Another point of interest is that a zero exponent represents absolute zero - as far as I can see, the mantissa contents are ignored in this case. This is borne out by a funny quirk of C64 basic: if you say X=0, this is stored as $00 00 00 00 00, whereas if you say X=0.0, this is stored as $00 20 00 00 00! (or maybe the 20 should be 32 - I can't remember whether I was printing in decimal or hex when I discovered this.) I have also done a fair amount of research on these routines but I'll leave Ray to carry on with his excellent series. If I have any other points to raise I'll do so! Jeff (from rainswept England). UUCP: ... decvax!decwrl!rhea!vogon!goodenough ...allegra!decwrl!rhea!vogon!goodenough ... ucbvax!decwrl!rhea!vogon!goodenough ARPA: decwrl!rhea!vogon!goodenough@Berkeley decwrl!rhea!vogon!goodenough@SU-Shasta