1 extern int __fpclassifyd (double x); 2 fdim(double x,double y)3 double fdim (double x, double y) 4 { 5 int c = __fpclassifyd (x); 6 if (c == 0) 7 return (x); 8 if (__fpclassifyd (y) == 0) 9 return (y); 10 if (c == 1) 11 return (__builtin_huge_val ()); 12 return x > y ? x - y : 0.0; 13 } 14