repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Expand PMF_FN_* macros.
[netbsd-mini2440.git]
/
sys
/
arch
/
pmax
/
test
/
fp.c
blob
7a2ff0964f591afd515a721d3fe0ac0307ab97a5
1
#include <stdio.h>
2
3
union
{
4
unsigned
w
;
5
float
f
;
6
}
uf
;
7
8
union
{
9
unsigned
w
[
2
];
10
double
d
;
11
}
ud
;
12
13
/*
14
* Read test vectors from file and test the fp emulation by
15
* comparing it with the hardware.
16
*/
17
main
(
argc
,
argv
)
18
int
argc
;
19
char
**
argv
;
20
{
21
22
while
(
scanf
(
"%lf"
, &
ud
.
d
) ==
1
) {
23
uf
.
f
=
ud
.
d
;
24
printf
(
"%g = (%x,%x) (%x)
\n
"
,
ud
.
d
,
ud
.
w
[
1
],
ud
.
w
[
0
],
uf
.
w
);
25
}
26
exit
(
0
);
27
}