1#include <math.h>
2
3float fdimf(float x, float y) {
4    if (isnan(x))
5        return x;
6    if (isnan(y))
7        return y;
8    return x > y ? x - y : 0;
9}
10