1 extern void exit (int); 2 extern void abort (void); 3 4 float rintf(float x)5rintf (float x) 6 { 7 static const float TWO23 = 8388608.0; 8 9 if (__builtin_fabs (x) < TWO23) 10 { 11 if (x > 0.0) 12 { 13 x += TWO23; 14 x -= TWO23; 15 } 16 else if (x < 0.0) 17 { 18 x = TWO23 - x; 19 x = -(x - TWO23); 20 } 21 } 22 23 return x; 24 } 25 main(void)26int main (void) 27 { 28 if (rintf (-1.5) != -2.0) 29 abort (); 30 exit (0); 31 } 32