summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/i386/lrint.c
blob: 89563ab26959ede3218de550b97624d7edce556f (plain)
1
2
3
4
5
6
7
8
#include <math.h>

long lrint(double x)
{
	long r;
	__asm__ ("fistpl %0" : "=m"(r) : "t"(x) : "st");
	return r;
}