aboutsummaryrefslogtreecommitdiff
path: root/src/math/fdimf.c
blob: 73251cde39a2cf1c4a25e1e21e5ba09055daca00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <math.h>

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


#ifdef TEST
int
main(void) {
	return 0;
}
#endif