Back to index

glibc  2.9
fenv.h
Go to the documentation of this file.
00001 /* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _FENV_H
00020 # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
00021 #endif
00022 
00023 
00024 /* Here should be the exception be defined:
00025     FE_INVALID
00026     FE_DIVBYZERO
00027     FE_OVERFLOW
00028     FE_UNDERFLOW
00029     FE_INEXACT
00030    We define no macro which signals no exception is supported.  */
00031 
00032 #define FE_ALL_EXCEPT 0
00033 
00034 
00035 /* Here should the rounding modes be defined:
00036     FE_TONEAREST
00037     FE_DOWNWARD
00038     FE_UPWARD
00039     FE_TOWARDZERO
00040    We define no macro which signals no rounding mode is selectable.  */
00041 
00042 
00043 /* Type representing exception flags.  */
00044 typedef unsigned int fexcept_t;
00045 
00046 
00047 /* Type representing floating-point environment.  */
00048 typedef struct
00049   {
00050     fexcept_t __excepts;
00051     /* XXX I don't know what else we should save.  */
00052   }
00053 fenv_t;
00054 
00055 /* If the default argument is used we use this value.  */
00056 #define FE_DFL_ENV   ((__const fenv_t *) -1l)