1FERAISEEXCEPT(P) POSIX Programmer's Manual FERAISEEXCEPT(P)
2
3
4
6 feraiseexcept - raise floating-point exception
7
9 #include <fenv.h>
10
11 int feraiseexcept(int excepts);
12
13
15 The feraiseexcept() function shall attempt to raise the supported
16 floating-point exceptions represented by the argument excepts. The
17 order in which these floating-point exceptions are raised is unspeci‐
18 fied. Whether the feraiseexcept() function additionally raises the
19 inexact floating-point exception whenever it raises the overflow or
20 underflow floating-point exception is implementation-defined.
21
23 If the argument is zero or if all the specified exceptions were suc‐
24 cessfully raised, feraiseexcept() shall return zero. Otherwise, it
25 shall return a non-zero value.
26
28 No errors are defined.
29
30 The following sections are informative.
31
33 None.
34
36 The effect is intended to be similar to that of floating-point excep‐
37 tions raised by arithmetic operations. Hence, enabled traps for float‐
38 ing-point exceptions raised by this function are taken.
39
41 Raising overflow or underflow is allowed to also raise inexact because
42 on some architectures the only practical way to raise an exception is
43 to execute an instruction that has the exception as a side effect. The
44 function is not restricted to accept only valid coincident expressions
45 for atomic operations, so the function can be used to raise exceptions
46 accrued over several operations.
47
49 None.
50
52 feclearexcept() , fegetexceptflag() , fesetexceptflag() , fetestex‐
53 cept() , the Base Definitions volume of IEEE Std 1003.1-2001, <fenv.h>
54
56 Portions of this text are reprinted and reproduced in electronic form
57 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
58 -- Portable Operating System Interface (POSIX), The Open Group Base
59 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
60 Electrical and Electronics Engineers, Inc and The Open Group. In the
61 event of any discrepancy between this version and the original IEEE and
62 The Open Group Standard, the original IEEE and The Open Group Standard
63 is the referee document. The original Standard can be obtained online
64 at http://www.opengroup.org/unix/online.html .
65
66
67
68IEEE/The Open Group 2003 FERAISEEXCEPT(P)