shithub: npe

ref: 742736e50d97306ad16853d18c977b502cf35b82
dir: /libnpe/lrintf.c/

View raw version
#include <math.h>

int
lrintf(float f)
{
	int i;

	*((float*)&i) = f + 12582912.0f;

	return (i & 0x7fffff) - 0x400000;
}