Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > f

fegetenv(3M)

HP-UX 11i Version 1.6: June 2002
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

fegetenv() — get floating-point environment

SYNOPSIS

#include <fenv.h>

void fegetenv(fenv_t *envp);

DESCRIPTION

The fegetenv() function stores the current floating-point environment in the object pointed to by the argument envp.

To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options.

Make sure your program includes <fenv.h>.

For IPF, specify +Ofenvaccess on the compiler command line or place the call to this function under the effect of an affirmative FENV_ACCESS pragma:

#pragma STDC FENV_ACCESS ON

If the FENV_ACCESS pragma is placed outside of any top-level declarations in a file, the pragma will apply to all declarations in the compilation following the pragma until another FENV_ACCESS pragma is encountered or until the end of the file is reached.

If the FENV_ACCESS pragma is placed at the beginning of a block (compound statement), the pragma will apply until another FENV_ACCESS pragma is encountered or until the end of the block is reached.

For PA-RISC, you might need to use the +Onomoveflops compiler option in order to prevent optimizations that can undermine the specified behavior of this function.

Link in the math library by specifying -lm on the compiler or linker command line.

For more information, see the HP-UX Floating-Point Guide.

RETURN VALUE

None.

ERRORS

No errors are defined.

EXAMPLE

Store the current floating-point environment:

#include <fenv.h> /*...*/ fenv_t env; /*...*/ fegetenv(&env);

STANDARDS CONFORMANCE

fegetenv() : ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic")

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2002 Hewlett-Packard Development Company, L.P.