summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/wordsize-64/math_private.h
blob: 4f9219934a3411262d97d4e75505adb87483d7d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _MATH_PRIVATE_H_

#include_next <math_private.h>
#include <stdint.h>

#ifndef __isnan
extern __always_inline int
__isnan (double d)
{
  uint64_t di;
  EXTRACT_WORDS64 (di, d);
  return (di & 0x7fffffffffffffffull) > 0x7ff0000000000000ull;
}
#endif

#ifndef __isinf_ns
extern __always_inline int
__isinf_ns (double d)
{
  uint64_t di;
  EXTRACT_WORDS64 (di, d);
  return (di & 0x7fffffffffffffffull) == 0x7ff0000000000000ull;
}
#endif

#ifndef __finite
extern __always_inline int
__finite (double d)
{
  uint64_t di;
  EXTRACT_WORDS64 (di, d);
  return (di & 0x7fffffffffffffffull) < 0x7ff0000000000000ull;
}
#endif

#endif /* _MATH_PRIVATE_H_ */