]> git.saurik.com Git - apple/libc.git/blame - gdtoa/FreeBSD/gdtoa_fltrnds.h
Libc-594.9.5.tar.gz
[apple/libc.git] / gdtoa / FreeBSD / gdtoa_fltrnds.h
CommitLineData
34e8f829
A
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 }