/* compile with -std=c99 */ #include #include #include int main(int argc, char** argv) { float x = atof(argv[1]); printf("x = %f\n", x); printf("lrintf %i\n", lrintf(x)); printf("lrintf %i\n", lrintf(-x)); printf("rintf %f\n", rintf(x)); printf("rintf %f\n", rintf(-x)); printf("lroundf %i\n", lroundf(x)); printf("lroundf %i\n", lroundf(-x)); printf("roundf %f\n", roundf(x)); printf("roundf %f\n", roundf(-x)); }