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