projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add useless, obsolescent function ulimit
[musl]
/
src
/
math
/
__fpclassifyl.c
1
#include <stdint.h>
2
#include <math.h>
3
4
/* FIXME: move this to arch-specific file */
5
int __fpclassifyl(long double __x)
6
{
7
union {
8
long double __ld;
9
__uint16_t __hw[5];
10
__uint64_t __m;
11
} __y = { __x };
12
int __ee = __y.__hw[4]&0x7fff;
13
if (!__ee) return __y.__m ? FP_SUBNORMAL : FP_ZERO;
14
if (__ee==0x7fff) return __y.__m ? FP_NAN : FP_INFINITE;
15
return FP_NORMAL;
16
}