1FEGETENV(3P) POSIX Programmer's Manual FEGETENV(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 fegetenv, fesetenv — get and set current floating-point environment
13
15 #include <fenv.h>
16
17 int fegetenv(fenv_t *envp);
18 int fesetenv(const fenv_t *envp);
19
21 The functionality described on this reference page is aligned with the
22 ISO C standard. Any conflict between the requirements described here
23 and the ISO C standard is unintentional. This volume of POSIX.1‐2017
24 defers to the ISO C standard.
25
26 The fegetenv() function shall attempt to store the current floating-
27 point environment in the object pointed to by envp.
28
29 The fesetenv() function shall attempt to establish the floating-point
30 environment represented by the object pointed to by envp. The argument
31 envp shall point to an object set by a call to fegetenv() or feholdex‐
32 cept(), or equal a floating-point environment macro. The fesetenv()
33 function does not raise floating-point exceptions, but only installs
34 the state of the floating-point status flags represented through its
35 argument.
36
38 If the representation was successfully stored, fegetenv() shall return
39 zero. Otherwise, it shall return a non-zero value. If the environment
40 was successfully established, fesetenv() shall return zero. Otherwise,
41 it shall return a non-zero value.
42
44 No errors are defined.
45
46 The following sections are informative.
47
49 None.
50
52 None.
53
55 None.
56
58 None.
59
61 feholdexcept(), feupdateenv()
62
63 The Base Definitions volume of POSIX.1‐2017, <fenv.h>
64
66 Portions of this text are reprinted and reproduced in electronic form
67 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
68 table Operating System Interface (POSIX), The Open Group Base Specifi‐
69 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
70 Electrical and Electronics Engineers, Inc and The Open Group. In the
71 event of any discrepancy between this version and the original IEEE and
72 The Open Group Standard, the original IEEE and The Open Group Standard
73 is the referee document. The original Standard can be obtained online
74 at http://www.opengroup.org/unix/online.html .
75
76 Any typographical or formatting errors that appear in this page are
77 most likely to have been introduced during the conversion of the source
78 files to man page format. To report such errors, see https://www.ker‐
79 nel.org/doc/man-pages/reporting_bugs.html .
80
81
82
83IEEE/The Open Group 2017 FEGETENV(3P)