Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


fenv.h
001: /* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: /*
020:  * ISO C99 7.6: Floating-point environment      <fenv.h>
021:  */
022: 
023: #ifndef _FENV_H
024: #define _FENV_H 1
025: 
026: #include <features.h>
027: 
028: /* Get the architecture dependend definitions.  The following definitions
029:    are expected to be done:
030: 
031:    fenv_t       type for object representing an entire floating-point
032:                 environment
033: 
034:    FE_DFL_ENV   macro of type pointer to fenv_t to be used as the argument
035:                 to functions taking an argument of type fenv_t; in this
036:                 case the default environment will be used
037: 
038:    fexcept_t    type for object representing the floating-point exception
039:                 flags including status associated with the flags
040: 
041:    The following macros are defined iff the implementation supports this
042:    kind of exception.
043:    FE_INEXACT           inexact result
044:    FE_DIVBYZERO         division by zero
045:    FE_UNDERFLOW         result not representable due to underflow
046:    FE_OVERFLOW          result not representable due to overflow
047:    FE_INVALID           invalid operation
048: 
049:    FE_ALL_EXCEPT        bitwise OR of all supported exceptions
050: 
051:    The next macros are defined iff the appropriate rounding mode is
052:    supported by the implementation.
053:    FE_TONEAREST         round to nearest
054:    FE_UPWARD            round toward +Inf
055:    FE_DOWNWARD          round toward -Inf
056:    FE_TOWARDZERO        round toward 0
057: */
058: #include <bits/fenv.h>
059: 
060: __BEGIN_DECLS
061: 
062: /* Floating-point exception handling.  */
063: 
064: /* Clear the supported exceptions represented by EXCEPTS.  */
065: extern int feclearexcept (int __excepts) __THROW;
066: 
067: /* Store implementation-defined representation of the exception flags
068:    indicated by EXCEPTS in the object pointed to by FLAGP.  */
069: extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW;
070: 
071: /* Raise the supported exceptions represented by EXCEPTS.  */
072: extern int feraiseexcept (int __excepts) __THROW;
073: 
074: /* Set complete status for exceptions indicated by EXCEPTS according to
075:    the representation in the object pointed to by FLAGP.  */
076: extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW;
077: 
078: /* Determine which of subset of the exceptions specified by EXCEPTS are
079:    currently set.  */
080: extern int fetestexcept (int __excepts) __THROW;
081: 
082: 
083: /* Rounding control.  */
084: 
085: /* Get current rounding direction.  */
086: extern int fegetround (void) __THROW;
087: 
088: /* Establish the rounding direction represented by ROUND.  */
089: extern int fesetround (int __rounding_direction) __THROW;
090: 
091: 
092: /* Floating-point environment.  */
093: 
094: /* Store the current floating-point environment in the object pointed
095:    to by ENVP.  */
096: extern int fegetenv (fenv_t *__envp) __THROW;
097: 
098: /* Save the current environment in the object pointed to by ENVP, clear
099:    exception flags and install a non-stop mode (if available) for all
100:    exceptions.  */
101: extern int feholdexcept (fenv_t *__envp) __THROW;
102: 
103: /* Establish the floating-point environment represented by the object
104:    pointed to by ENVP.  */
105: extern int fesetenv (__const fenv_t *__envp) __THROW;
106: 
107: /* Save current exceptions in temporary storage, install environment
108:    represented by object pointed to by ENVP and raise exceptions
109:    according to saved exceptions.  */
110: extern int feupdateenv (__const fenv_t *__envp) __THROW;
111: 
112: 
113: /* Include optimization.  */
114: #ifdef __OPTIMIZE__
115: # include <bits/fenvinline.h>
116: #endif
117: 
118: #ifdef __USE_GNU
119: 
120: /* Enable individual exceptions.  Will not enable more exceptions than
121:    EXCEPTS specifies.  Returns the previous enabled exceptions if all
122:    exceptions are successfully set, otherwise returns -1.  */
123: extern int feenableexcept (int __excepts) __THROW;
124: 
125: /* Disable individual exceptions.  Will not disable more exceptions than
126:    EXCEPTS specifies.  Returns the previous enabled exceptions if all
127:    exceptions are successfully disabled, otherwise returns -1.  */
128: extern int fedisableexcept (int __excepts) __THROW;
129: 
130: /* Return enabled exceptions.  */
131: extern int fegetexcept (void) __THROW;
132: #endif
133: 
134: __END_DECLS
135: 
136: #endif /* fenv.h */
137: 


for client 18.224.33.107
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/