Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
Utilities
interface
isFinite.h
Go to the documentation of this file.
1
#ifndef FWCORE_Utilities_isFinite_H
2
#define FWCORE_Utilities_isFinite_H
3
4
namespace
edm {
5
template
<
typename
T>
6
bool
isFinite
(
T
x);
7
8
template
<
typename
T>
9
inline
10
bool
isNotFinite
(
T
x) {
11
return
!
isFinite
(x);
12
}
13
14
template
<>
15
inline
16
bool
isFinite
(
float
x) {
17
const
unsigned
int
mask = 0x7f800000;
18
union
{
unsigned
int
l
;
float
d
;}
v
;
19
v
.d =x;
20
return
(
v
.l&mask)!=mask;
21
}
22
23
template
<>
24
inline
25
bool
isFinite
(
double
x) {
26
const
unsigned
long
long
mask = 0x7FF0000000000000LL;
27
union
{
unsigned
long
long
l
;
double
d
;}
v
;
28
v
.d =x;
29
return
(
v
.l&mask)!=mask;
30
}
31
32
template
<>
33
inline
34
bool
isFinite
(
long
double
x) {
35
double
xx=x;
36
return
isFinite
(xx);
37
}
38
39
}
40
41
#endif // FWCORE_Utilities_isFinite_H
42
findQualityFiles.v
v
Definition:
findQualityFiles.py:177
edm::isFinite
bool isFinite(T x)
ztail.d
tuple d
Definition:
ztail.py:151
edm::isNotFinite
bool isNotFinite(T x)
Definition:
isFinite.h:10
prof2calltree.l
tuple l
Definition:
prof2calltree.py:116
T
long double T
Definition:
Basic3DVectorLD.h:57
Generated for CMSSW Reference Manual by
1.8.5