EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
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
6
void
enable_exceptions_
()
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
*/
22
void
enable_exceptions__
()
23
{
24
enable_exceptions_
();
25
}
estarlight
blob
master
utils
external
fpe.c
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:38
using
1.8.2 with
EIC GitHub integration