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 34These functions provide control of the floating-point exception 35masks. 36The 37.Fa excepts 38input argument is a bitmask specifying an exception type and 39containing any of the values listed in 40.Xr feclearexcept 3 . 41.Pp 42The 43.Fn feenableexcept 44function unmasks the floating-point exceptions represented by 45.Fa excepts . 46The future floating-point operations that produce 47.Fa excepts 48will trap, and a 49.Dv SIGFPE 50will be delivered to the process. 51.Pp 52The 53.Fn fedisableexcept 54function masks the floating-point exceptions represented by 55.Fa excepts . 56All exceptions are masked by default. 57.Pp 58The 59.Fn fegetexcept 60function returns the current exception mask. 61.Sh RETURN VALUES 62The 63.Fn feenableexcept , 64and 65.Fn fedisableexcept 66functions return the previous exception mask. 67The 68.Fn fegetexcept 69function 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 76The 77.Fn feenableexcept , 78.Fn fedisableexcept , 79and 80.Fn fegetexcept 81functions are 82.Ox 83extensions. 84.Sh HISTORY 85These functions first appeared in 86.Ox 5.0 . 87