1570af302Sopenharmony_ci#include <math.h> 2570af302Sopenharmony_ci 3570af302Sopenharmony_cifloat fminf(float x, float y) 4570af302Sopenharmony_ci{ 5570af302Sopenharmony_ci if (isnan(x)) 6570af302Sopenharmony_ci return y; 7570af302Sopenharmony_ci if (isnan(y)) 8570af302Sopenharmony_ci return x; 9570af302Sopenharmony_ci /* handle signed zeros, see C99 Annex F.9.9.2 */ 10570af302Sopenharmony_ci if (signbit(x) != signbit(y)) 11570af302Sopenharmony_ci return signbit(x) ? x : y; 12570af302Sopenharmony_ci return x < y ? x : y; 13570af302Sopenharmony_ci} 14