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