Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Wayne K. Werner" Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: A reply to one of Nick's questions. Date: 3 Dec 1997 04:07:50 GMT Organization: WermX Software Lines: 40 Message-ID: <01bcffa1$b4193660$a5bf43ce@wkwerner> References: <01bcbc4f$8c5a55e0$0e9f22cf@SmarttNet.smartt.com> <3414FD7E.2EE5@bc.sympatico.ca> <34150952.6D6A5DF3@micronetics.com> <01bcfc94$f0520e00$6abf43ce@wkwerner> NNTP-Posting-Host: port65.con2.com X-Newsreader: Microsoft Internet News 4.70.1161 I wrote: That #define of ONE is *really* fixed point 4.12 (or 20.12 if you are using longs). Just wondering if Nick's algorithm (later in this thread) works for this flavor of fixed point? Then Joel emailed me: If you are seeing "4.12" in the debugger when the decimal value is 4096, it's because the debugger is displaying it improperly. There is no "standard" fixed point representation. The Sony libraries use a 12 bit fractional part in their fixed point representation. 4096=2^12 or %1000000000000. Thus, the fractional part is 0 and the decimal part is 1. The debugger isn't set up right now to understand the Sony fixed-point format for the PlayStation. Thus, I'm assuming this is where your 4.12 is coming from. Joel, I didn't mean to imply that I was seeing the value, "4.12". I meant that there is 4 binary digits of mantissa and 12 binary digits in the fractional part, 20 digits of mantissa for longs. Indeed, the value of 4096 reps the fixed point value of "1.000000000000", which is what I was trying to communicate. That's what I get for knocking off messages late at night without thinking! Wayne K. Werner wkwerner@con2.com