1feholdexcept(3M)        Mathematical Library Functions        feholdexcept(3M)
2
3
4

NAME

6       feholdexcept - save current floating-point environment
7

SYNOPSIS

9       c99 [ flag... ] file... -lm [ library... ]
10       #include <fenv.h>
11
12       int feholdexcept(fenv_t *envp);
13
14

DESCRIPTION

16       The  feholdexcept()  function saves the current floating-point environ‐
17       ment in the object pointed to by envp, clears the floating-point status
18       flags,  and then installs a non-stop (continue on floating-point excep‐
19       tions) mode, if available, for all floating-point exceptions.
20

RETURN VALUES

22       The feholdexcept() function returns 0 if and only if non-stop floating-
23       point exception handling was successfully installed.
24

ERRORS

26       No errors are defined.
27

ATTRIBUTES

29       See attributes(5) for descriptions of the following attributes:
30
31
32
33
34       ┌─────────────────────────────┬─────────────────────────────┐
35       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
36       ├─────────────────────────────┼─────────────────────────────┤
37       │Interface Stability          │Standard                     │
38       ├─────────────────────────────┼─────────────────────────────┤
39       │MT-Level                     │MT-Safe                      │
40       └─────────────────────────────┴─────────────────────────────┘
41

SEE ALSO

43       fegetenv(3M),   fenv.h(3HEAD),  feupdateenv(3M),  attributes(5),  stan‐
44       dards(5)
45

NOTES

47       In a multithreaded program, the  feholdexcept()  function  affects  the
48       floating point environment only for the calling thread.
49
50
51       The  feholdexcept()  function  automatically  installs  and  deinstalls
52       SIGFPE handlers and sets and clears the trap enable mode  bits  in  the
53       floating point status register as needed. If a program uses these func‐
54       tions and attempts to install a SIGFPE  handler  or  control  the  trap
55       enable mode bits independently, the resulting behavior is not defined.
56
57
58
59SunOS 5.11                        12 Jul 2006                 feholdexcept(3M)
Impressum