1 2 3 4 5 6 7 8
#include <math.h> /* assumes LLONG_MAX > 2^53, see comments in lrint.c */ long long llrint(double x) { return rint(x); }