repo.or.cz
/
mono.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-06-21 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git]
/
mono
/
utils
/
mono-math.c
blob
f75064ba3c17b6fc02bb5a0a958bdd1d835404b0
1
2
#include
"mono-math.h"
3
4
#ifndef HAVE_SIGNBIT
5
6
int
7
mono_signbit_float
(
float
x
)
8
{
9
union
{
float
f
;
int
i
; }
u
;
10
11
u
.
f
=
x
;
12
13
return
u
.
i
<
0
;
14
}
15
16
int
17
mono_signbit_double
(
double
x
)
18
{
19
union
{
double
d
;
int
i
[
2
]; }
u
;
20
21
u
.
d
=
x
;
22
23
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
24
return
u
.
i
[
1
] <
0
;
25
#else
26
return
u
.
i
[
0
] <
0
;
27
#endif
28
}
29
30
#endif