repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Import gdtoa-20081205.
[dragonfly.git]
/
contrib
/
gdtoa
/
gdtoa_fltrnds.h
blob
33e5f9e5342c8568e487b6a43115ce8091e35b7d
1
FPI
*
fpi
,
fpi1
;
2
int
Rounding
;
3
#ifdef Trust_FLT_ROUNDS
/*{{ only define this if FLT_ROUNDS really works! */
4
Rounding
=
Flt_Rounds
;
5
#else
/*}{*/
6
Rounding
=
1
;
7
switch
(
fegetround
()) {
8
case
FE_TOWARDZERO
:
Rounding
=
0
;
break
;
9
case
FE_UPWARD
:
Rounding
=
2
;
break
;
10
case
FE_DOWNWARD
:
Rounding
=
3
;
11
}
12
#endif
/*}}*/
13
fpi
= &
fpi0
;
14
if
(
Rounding
!=
1
) {
15
fpi1
=
fpi0
;
16
fpi
= &
fpi1
;
17
fpi1
.
rounding
=
Rounding
;
18
}