3 /* Copyright (C) 1988-1991 Apple Computer, Inc.
7 * Even though Apple has reviewed this software, Apple makes no warranty
8 * or representation, either express or implied, with respect to this
9 * software, its quality, accuracy, merchantability, or fitness for a
10 * particular purpose. As a result, this software is provided "as is,"
11 * and you, its user, are assuming the entire risk as to its quality
14 * This code may be used and freely distributed as long as it includes
15 * this copyright notice and the warranty information.
17 * Machine-independent I/O routines for IEEE FLOATing-point numbers.
19 * NaN's and infinities are converted to HUGE_VAL or HUGE, which
20 * happens to be infinity on IEEE machines. Unfortunately, it is
21 * impossible to preserve NaN's in a machine-independent way.
22 * Infinities are, however, preserved on IEEE machines.
24 * These routines have been tested on the following machines:
25 * Apple Macintosh, MPW 3.1 C compiler
26 * Apple Macintosh, THINK C compiler
27 * Silicon Graphics IRIS, MIPS compiler
29 * Digital Equipment VAX
30 * Sequent Balance (Multiprocesor 386)
34 * Implemented by Malcolm Slaney and Ken Turkowski.
36 * Malcolm Slaney contributions during 1988-1990 include big- and little-
37 * endian file I/O, conversion to and from Motorola's extended 80-bit
38 * FLOATing-point format, and conversions to and from IEEE single-
39 * precision FLOATing-point format.
41 * In 1991, Ken Turkowski implemented the conversions to and from
42 * IEEE double-precision format, added more precision to the extended
43 * conversions, and accommodated conversions involving +/- infinity,
44 * NaN's, and denormalized numbers.
46 * $Id: ieeefloat.h,v 1.1 2003/10/04 00:11:19 herman Exp $
48 * $Log: ieeefloat.h,v $
49 * Revision 1.1 2003/10/04 00:11:19 herman
50 * New file from 1.1.7 (not in 1.1.6) added from Rich's automakified src tree.
52 * Revision 1.1 2003/07/29 04:17:52 heroine
53 * *** empty log message ***
55 * Revision 1.1 1993/06/11 17:45:46 malcolm
64 #define kFloatLength 4
65 #define kDoubleLength 8
66 #define kExtendedLength 10
68 double ConvertFromIeeeExtended (char *bytes
);