float.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1989 Regents of the University of California.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. All advertising materials mentioning features or use of this software
00014  *    must display the following acknowledgement:
00015  *      This product includes software developed by the University of
00016  *      California, Berkeley and its contributors.
00017  * 4. Neither the name of the University nor the names of its contributors
00018  *    may be used to endorse or promote products derived from this software
00019  *    without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  *      from: @(#)float.h       7.1 (Berkeley) 5/8/90
00034  * $FreeBSD: src/sys/arm/include/float.h,v 1.5 2005/03/20 00:34:24 cognet Exp $
00035  */
00036 
00037 #ifndef _MACHINE_FLOAT_H_
00038 #define _MACHINE_FLOAT_H_ 1
00039 
00040 #include <sys/cdefs.h>
00041 
00042 __BEGIN_DECLS
00043 extern int __flt_rounds(void);
00044 __END_DECLS
00045 
00046 #define FLT_RADIX       2               /* b */
00047 #define FLT_ROUNDS      -1
00048 #define FLT_EVAL_METHOD (-1)            /* XXX */
00049 #define DECIMAL_DIG     17              /* max precision in decimal digits */
00050 
00051 #define FLT_MANT_DIG    24              /* p */
00052 #define FLT_EPSILON     1.19209290E-07F /* b**(1-p) */
00053 #define FLT_DIG         6               /* floor((p-1)*log10(b))+(b == 10) */
00054 #define FLT_MIN_EXP     (-125)          /* emin */
00055 #define FLT_MIN         1.17549435E-38F /* b**(emin-1) */
00056 #define FLT_MIN_10_EXP  (-37)           /* ceil(log10(b**(emin-1))) */
00057 #define FLT_MAX_EXP     128             /* emax */
00058 #define FLT_MAX         3.40282347E+38F /* (1-b**(-p))*b**emax */
00059 #define FLT_MAX_10_EXP  38              /* floor(log10((1-b**(-p))*b**emax)) */
00060 
00061 #define DBL_MANT_DIG    53
00062 #define DBL_EPSILON     2.2204460492503131E-16
00063 #define DBL_DIG         15
00064 #define DBL_MIN_EXP     (-1021)
00065 #define DBL_MIN         2.2250738585072014E-308
00066 #define DBL_MIN_10_EXP  (-307)
00067 #define DBL_MAX_EXP     1024
00068 #define DBL_MAX         1.7976931348623157E+308
00069 #define DBL_MAX_10_EXP  308
00070 
00071 #define LDBL_MANT_DIG   DBL_MANT_DIG
00072 #define LDBL_EPSILON    DBL_EPSILON
00073 #define LDBL_DIG        DBL_DIG
00074 #define LDBL_MIN_EXP    DBL_MIN_EXP
00075 #define LDBL_MIN        DBL_MIN
00076 #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
00077 #define LDBL_MAX_EXP    DBL_MAX_EXP
00078 #define LDBL_MAX        DBL_MAX
00079 #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
00080 #endif /* _MACHINE_FLOAT_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top