]> Pileus Git - ~andy/fetchmail/blob - trio/doc/doc_nan.h
Add new gai.c debug source.
[~andy/fetchmail] / trio / doc / doc_nan.h
1 /*************************************************************************
2  *
3  * $Id: doc_nan.h,v 1.1 2001/12/30 12:47:41 breese Exp $
4  *
5  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13  * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14  * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15  *
16  ************************************************************************/
17
18 /** @addtogroup SpecialQuantities Special Quantifies.
19 Functions to detect and fabricate special quantities in floating-point
20 numbers.
21
22 @b SYNOPSIS
23
24 @verbatim
25 cc ... -ltrio -lm
26
27 #include <trionan.h>
28 @endverbatim
29
30 @b DESCRIPTION
31
32 Certain arithmetical operations does not result in normal numbers. Instead
33 they result in special quantities that must be handled differently by the
34 floating-point hardware. These includes Infinity and Not-A-Number (NaN).
35
36 For example, 0/0 (zero divided by zero) yields NaN. Any operation which
37 involves a NaN will result in NaN. Any comparison involving NaN will be
38 unsuccessful, even if NaN is compared to NaN.
39
40 These special quantities are represented with special bit patterns by the
41 floating-point hardware, and this bit patterns depend on the hardware.
42 There may even be hardware that does not support special quantities, so
43 the functions in this module are not guaranteed to work on all platforms.
44
45 The approach used in this module is to (in decreasing order of importance)
46 @li Use C99 functionality when available.
47 @li Use IEEE 754-1985 bit patterns if possible.
48 @li Use platform-specific techniques.
49
50 @b NOTES
51
52 This module does not depend on the rest of trio, and can thus be reused
53 separately. The following files are necessary:
54 @li @c triodef.h
55 @li @c trionan.h
56 @li @c trionan.c
57
58 */