home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!spool.mu.edu!torn!news.ccs.queensu.ca!slip202.telnet1.QueensU.CA!dmurdoch
- From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
- Subject: Re: NaN and comp type
- Message-ID: <dmurdoch.333.727797095@mast.queensu.ca>
- Keywords: comp, NaN
- Lines: 17
- Sender: news@knot.ccs.queensu.ca (Netnews control)
- Organization: Queen's University
- References: <1993Jan23.072940.22388@qiclab.scn.rain.com>
- Date: Sat, 23 Jan 1993 13:51:35 GMT
-
- In article <1993Jan23.072940.22388@qiclab.scn.rain.com> leonard@qiclab.scn.rain.com (Leonard Erickson) writes:
- >According to the TP6 manual, NaN is represented for the comp type
- >by a value of 0, with a sign bit of 1. But if you *create* such a
- >value TP 5.5 and TP 6.0 both treat it as a *large* negative
- >number (-9.22337203685478E+0018)
-
- >So is it broken, or are the docs wrong? I was *hoping* to use it
- >to mark uninitialized values. <sigh>
-
- According to the Intel manual (the one I'm using is the 486 Programmer's
- Reference, but I've seen the same thing in the 80x87 manuals) the thing
- described in the TP manual is returned as the result of a calculation that
- produces a NaN, but is treated as a number when read from memory. There's
- no encoding for the integer types that reads as a NaN.
-
- Duncan Murdoch
- dmurdoch@mast.queensu.ca
-