double fmin (double x , double y); float fmin (float x , float y); long double fmin (long double x, long double y); double fmin (Type1 x , Type2 y); // additional overloads
تعطي الدالة الرقم الأصغر بين رقمين مدخلين
/* fmin example */ #include <stdio.h> /* printf */ #include <math.h> /* fmin */ int main () { printf ("fmin (100.0, 1.0) = %f\n", fmin(100.0,1.0)); printf ("fmin (-100.0, 1.0) = %f\n", fmin(-100.0,1.0)); printf ("fmin (-100.0, -1.0) = %f\n", fmin(-100.0,-1.0)); return 0; }
fmin (100.0, 1.0) = 1.000000 fmin (-100.0, 1.0) = -100.000000 fmin (-100.0,-1.0) = -100.000000