summaryrefslogtreecommitdiff
path: root/lib/libm/fdimf.c
blob: a7fa678309d1e1470cecdc5a406e3e668df4e64f (plain)
1
2
3
4
5
6
7
8
9
10
#include <math.h> // for fdimf, isnan

float fdimf(float x, float y)
{
	if (isnan(x))
		return x;
	if (isnan(y))
		return y;
	return x > y ? x - y : 0;
}