Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bits
File: fenv.h
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
#ifndef _FENV_H
[17] Fix | Delete
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
[18] Fix | Delete
#endif
[19] Fix | Delete
[20] Fix | Delete
/* Define bits representing the exception. We use the bit positions
[21] Fix | Delete
of the appropriate bits in the FPU control word. */
[22] Fix | Delete
enum
[23] Fix | Delete
{
[24] Fix | Delete
FE_INVALID =
[25] Fix | Delete
#define FE_INVALID 0x01
[26] Fix | Delete
FE_INVALID,
[27] Fix | Delete
__FE_DENORM = 0x02,
[28] Fix | Delete
FE_DIVBYZERO =
[29] Fix | Delete
#define FE_DIVBYZERO 0x04
[30] Fix | Delete
FE_DIVBYZERO,
[31] Fix | Delete
FE_OVERFLOW =
[32] Fix | Delete
#define FE_OVERFLOW 0x08
[33] Fix | Delete
FE_OVERFLOW,
[34] Fix | Delete
FE_UNDERFLOW =
[35] Fix | Delete
#define FE_UNDERFLOW 0x10
[36] Fix | Delete
FE_UNDERFLOW,
[37] Fix | Delete
FE_INEXACT =
[38] Fix | Delete
#define FE_INEXACT 0x20
[39] Fix | Delete
FE_INEXACT
[40] Fix | Delete
};
[41] Fix | Delete
[42] Fix | Delete
#define FE_ALL_EXCEPT \
[43] Fix | Delete
(FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
[44] Fix | Delete
[45] Fix | Delete
/* The ix87 FPU supports all of the four defined rounding modes. We
[46] Fix | Delete
use again the bit positions in the FPU control word as the values
[47] Fix | Delete
for the appropriate macros. */
[48] Fix | Delete
enum
[49] Fix | Delete
{
[50] Fix | Delete
FE_TONEAREST =
[51] Fix | Delete
#define FE_TONEAREST 0
[52] Fix | Delete
FE_TONEAREST,
[53] Fix | Delete
FE_DOWNWARD =
[54] Fix | Delete
#define FE_DOWNWARD 0x400
[55] Fix | Delete
FE_DOWNWARD,
[56] Fix | Delete
FE_UPWARD =
[57] Fix | Delete
#define FE_UPWARD 0x800
[58] Fix | Delete
FE_UPWARD,
[59] Fix | Delete
FE_TOWARDZERO =
[60] Fix | Delete
#define FE_TOWARDZERO 0xc00
[61] Fix | Delete
FE_TOWARDZERO
[62] Fix | Delete
};
[63] Fix | Delete
[64] Fix | Delete
[65] Fix | Delete
/* Type representing exception flags. */
[66] Fix | Delete
typedef unsigned short int fexcept_t;
[67] Fix | Delete
[68] Fix | Delete
[69] Fix | Delete
/* Type representing floating-point environment. This structure
[70] Fix | Delete
corresponds to the layout of the block written by the `fstenv'
[71] Fix | Delete
instruction and has additional fields for the contents of the MXCSR
[72] Fix | Delete
register as written by the `stmxcsr' instruction. */
[73] Fix | Delete
typedef struct
[74] Fix | Delete
{
[75] Fix | Delete
unsigned short int __control_word;
[76] Fix | Delete
unsigned short int __glibc_reserved1;
[77] Fix | Delete
unsigned short int __status_word;
[78] Fix | Delete
unsigned short int __glibc_reserved2;
[79] Fix | Delete
unsigned short int __tags;
[80] Fix | Delete
unsigned short int __glibc_reserved3;
[81] Fix | Delete
unsigned int __eip;
[82] Fix | Delete
unsigned short int __cs_selector;
[83] Fix | Delete
unsigned int __opcode:11;
[84] Fix | Delete
unsigned int __glibc_reserved4:5;
[85] Fix | Delete
unsigned int __data_offset;
[86] Fix | Delete
unsigned short int __data_selector;
[87] Fix | Delete
unsigned short int __glibc_reserved5;
[88] Fix | Delete
#ifdef __x86_64__
[89] Fix | Delete
unsigned int __mxcsr;
[90] Fix | Delete
#endif
[91] Fix | Delete
}
[92] Fix | Delete
fenv_t;
[93] Fix | Delete
[94] Fix | Delete
/* If the default argument is used we use this value. */
[95] Fix | Delete
#define FE_DFL_ENV ((const fenv_t *) -1)
[96] Fix | Delete
[97] Fix | Delete
#ifdef __USE_GNU
[98] Fix | Delete
/* Floating-point environment where none of the exception is masked. */
[99] Fix | Delete
# define FE_NOMASK_ENV ((const fenv_t *) -2)
[100] Fix | Delete
#endif
[101] Fix | Delete
[102] Fix | Delete
#if __GLIBC_USE (IEC_60559_BFP_EXT)
[103] Fix | Delete
/* Type representing floating-point control modes. */
[104] Fix | Delete
typedef struct
[105] Fix | Delete
{
[106] Fix | Delete
unsigned short int __control_word;
[107] Fix | Delete
unsigned short int __glibc_reserved;
[108] Fix | Delete
unsigned int __mxcsr;
[109] Fix | Delete
}
[110] Fix | Delete
femode_t;
[111] Fix | Delete
[112] Fix | Delete
/* Default floating-point control modes. */
[113] Fix | Delete
# define FE_DFL_MODE ((const femode_t *) -1L)
[114] Fix | Delete
#endif
[115] Fix | Delete
[116] Fix | Delete
[117] Fix | Delete
#ifdef __USE_EXTERN_INLINES
[118] Fix | Delete
__BEGIN_DECLS
[119] Fix | Delete
[120] Fix | Delete
/* Optimized versions. */
[121] Fix | Delete
#ifndef _LIBC
[122] Fix | Delete
extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
[123] Fix | Delete
#endif
[124] Fix | Delete
__extern_always_inline void
[125] Fix | Delete
__NTH (__feraiseexcept_invalid_divbyzero (int __excepts))
[126] Fix | Delete
{
[127] Fix | Delete
if ((FE_INVALID & __excepts) != 0)
[128] Fix | Delete
{
[129] Fix | Delete
/* One example of an invalid operation is 0.0 / 0.0. */
[130] Fix | Delete
float __f = 0.0;
[131] Fix | Delete
[132] Fix | Delete
# ifdef __SSE_MATH__
[133] Fix | Delete
__asm__ __volatile__ ("divss %0, %0 " : "+x" (__f));
[134] Fix | Delete
# else
[135] Fix | Delete
__asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
[136] Fix | Delete
: "=t" (__f) : "0" (__f));
[137] Fix | Delete
# endif
[138] Fix | Delete
(void) &__f;
[139] Fix | Delete
}
[140] Fix | Delete
if ((FE_DIVBYZERO & __excepts) != 0)
[141] Fix | Delete
{
[142] Fix | Delete
float __f = 1.0;
[143] Fix | Delete
float __g = 0.0;
[144] Fix | Delete
[145] Fix | Delete
# ifdef __SSE_MATH__
[146] Fix | Delete
__asm__ __volatile__ ("divss %1, %0" : "+x" (__f) : "x" (__g));
[147] Fix | Delete
# else
[148] Fix | Delete
__asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
[149] Fix | Delete
: "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
[150] Fix | Delete
# endif
[151] Fix | Delete
(void) &__f;
[152] Fix | Delete
}
[153] Fix | Delete
}
[154] Fix | Delete
__extern_inline int
[155] Fix | Delete
__NTH (feraiseexcept (int __excepts))
[156] Fix | Delete
{
[157] Fix | Delete
if (__builtin_constant_p (__excepts)
[158] Fix | Delete
&& (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
[159] Fix | Delete
{
[160] Fix | Delete
__feraiseexcept_invalid_divbyzero (__excepts);
[161] Fix | Delete
return 0;
[162] Fix | Delete
}
[163] Fix | Delete
[164] Fix | Delete
return __feraiseexcept_renamed (__excepts);
[165] Fix | Delete
}
[166] Fix | Delete
[167] Fix | Delete
__END_DECLS
[168] Fix | Delete
#endif
[169] Fix | Delete
[170] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function