about summary refs log tree commit diff
path: root/src/math/fdimf.c
blob: 5cfeac6b05b1225ffe237292a77e096b07034bd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "libm.h"

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