Import OpenBSD's libm (trunk, 4 July 2015) to a new vendor branch
[dragonfly.git] / contrib / openbsd_libm / man / feenableexcept.3
1 .\"     $OpenBSD: feenableexcept.3,v 1.3 2013/06/05 03:40:26 tedu Exp $
2 .\"
3 .\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: June 5 2013 $
18 .Dt FEENABLEEXCEPT 3
19 .Os
20 .Sh NAME
21 .Nm feenableexcept ,
22 .Nm fedisableexcept ,
23 .Nm fegetexcept
24 .Nd control floating-point exception masks
25 .Sh SYNOPSIS
26 .In fenv.h
27 .Ft int
28 .Fn feenableexcept "int excepts"
29 .Ft int
30 .Fn fedisableexcept "int excepts"
31 .Ft int
32 .Fn fegetexcept void
33 .Sh DESCRIPTION
34 These functions provide control of the floating-point exception
35 masks.
36 The
37 .Fa excepts
38 input argument is a bitmask specifying an exception type and
39 containing any of the values listed in
40 .Xr feclearexcept 3 .
41 .Pp
42 The
43 .Fn feenableexcept
44 function unmasks the floating-point exceptions represented by
45 .Fa excepts .
46 The future floating-point operations that produce
47 .Fa excepts
48 will trap, and a
49 .Dv SIGFPE
50 will be delivered to the process.
51 .Pp
52 The
53 .Fn fedisableexcept
54 function masks the floating-point exceptions represented by
55 .Fa excepts .
56 All exceptions are masked by default.
57 .Pp
58 The
59 .Fn fegetexcept
60 function returns the current exception mask.
61 .Sh RETURN VALUES
62 The
63 .Fn feenableexcept ,
64 and
65 .Fn fedisableexcept
66 functions return the previous exception mask.
67 The
68 .Fn fegetexcept
69 function returns the current exception mask.
70 .Sh SEE ALSO
71 .Xr sigaction 2 ,
72 .Xr feclearexcept 3 ,
73 .Xr fegetenv 3 ,
74 .Xr fegetround 3
75 .Sh STANDARDS
76 The
77 .Fn feenableexcept ,
78 .Fn fedisableexcept ,
79 and
80 .Fn fegetexcept
81 functions are
82 .Ox
83 extensions.
84 .Sh HISTORY
85 These functions first appeared in
86 .Ox 5.0 .