EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fpe.c
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file fpe.c
1  #define _GNU_SOURCE
2  #include <stdio.h>
3  #include <stdlib.h>
4  #include <fenv.h>
5 
7  {
8  int retval;
9  /* feenableexcept returns the previous exceptions that were enabled
10  on success, otherwise it returns -1
11  */
12  retval=feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW );
13  if ( retval == -1 )
14  {
15  fprintf(stderr, "Warning: call to feenableexcept() failed \n");
16  }
17  }
18 
19  /* This second routine is for Fortran compilers such as g77 and pathf90
20  which follow the f2c name mangling style
21  */
23  {
25  }