www.delorie.com/djgpp/doc/libc/libc_556.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

math_errhandling

Syntax

 
#include <math.h>

Description

math_errhandling evaluates to an integer expression describing the floating-point error reporting methods used by the C library.

If math_errhandling returns the bit MATH_ERRNO set, then errors are reported using errno (see section errno).

If math_errhandling returns the bit MATH_ERREXCEPT set, then errors are reported by raising "exceptions".

The library may support both methods of error reporting. Currently DJGPP only supports reporting errors using errno.

Return Value

Which floating-point error reporting methods are available.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
if (math_errhandling & MATH_ERRNO)
  perror("myprogram");

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004