Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gdtoa_fltrnds.h « gdtoa « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 28c474e2c29f4b934a3e2b11d4fabfc10bfea3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
	FPI *fpi, fpi1;
	int Rounding;
#ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */
	Rounding = Flt_Rounds;
#else /*}{*/
	Rounding = 1;
	switch(fegetround()) {
	  case FE_TOWARDZERO:	Rounding = 0; break;
	  case FE_UPWARD:	Rounding = 2; break;
	  case FE_DOWNWARD:	Rounding = 3;
	}
#endif /*}}*/
	fpi = &fpi0;
	if (Rounding != 1) {
		fpi1 = fpi0;
		fpi = &fpi1;
		fpi1.rounding = Rounding;
	}