1 '\" te
   2 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at 
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10 .TH fegetexceptflag 3M "1 Sep 2002" "SunOS 5.11" "Mathematical Library Functions"
  11 .SH NAME
  12 fegetexceptflag, fesetexceptflag \- get and set floating-point status flags
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ]
  17 #include <fenv.h>
  18 
  19 \fBint\fR \fBfegetexceptflag\fR(\fBfexcept_t *\fR\fIflagp\fR, \fBint\fR \fIexcepts\fR);
  20 .fi
  21 
  22 .LP
  23 .nf
  24 \fBint\fR \fBfesetexceptflag\fR(\fBconst fexcept_t *\fR\fIflagp\fR, \fBint\fR \fIexcepts\fR);
  25 .fi
  26 
  27 .SH DESCRIPTION
  28 .sp
  29 .LP
  30 The \fBfegetexceptflag()\fR function attempts to store an
  31 implementation-defined representation of the states of the floating-point
  32 status flags indicated by the \fIexcepts\fR argument in the object pointed to
  33 by the \fIflagp\fR argument.
  34 .sp
  35 .LP
  36 The \fBfesetexceptflag()\fR function attempts to set the floating-point status
  37 flags indicated by the \fIexcepts\fR argument to the states stored in the
  38 object pointed to by \fIflagp\fR. The value pointed to by \fIflagp\fR will have
  39 been set by a previous call to \fBfegetexceptflag()\fR whose second argument
  40 represented at least those floating-point exceptions represented by the
  41 \fIexcepts\fR argument. This function does not raise floating-point exceptions
  42 but only sets the state of the flags.
  43 .SH RETURN VALUES
  44 .sp
  45 .LP
  46 If the representation was successfully stored, \fBfegetexceptflag()\fR returns
  47 0. Otherwise, it returns a non-zero value.
  48 .sp
  49 .LP
  50 If the excepts argument is 0 or if all the specified exceptions were
  51 successfully set, \fBfesetexceptflag()\fR returns 0. Otherwise, it returns a
  52 non-zero value.
  53 .SH ERRORS
  54 .sp
  55 .LP
  56 No errors are defined.
  57 .SH ATTRIBUTES
  58 .sp
  59 .LP
  60 See \fBattributes\fR(5) for descriptions of the following attributes:
  61 .sp
  62 
  63 .sp
  64 .TS
  65 tab() box;
  66 cw(2.75i) |cw(2.75i) 
  67 lw(2.75i) |lw(2.75i) 
  68 .
  69 ATTRIBUTE TYPEATTRIBUTE VALUE
  70 _
  71 Interface StabilityStandard
  72 _
  73 MT-LevelMT-Safe
  74 .TE
  75 
  76 .SH SEE ALSO
  77 .sp
  78 .LP
  79 \fBfenv.h\fR(3HEAD), \fBfeclearexcept\fR(3M), \fBferaiseexcept\fR(3M),
  80 \fBfesetexceptflag\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5)