IEEE specifies round-halfway-to-even. However Pelles C seems to follow 5/4 rounding.
GCC and DMC work as specified.
/* Test rint */
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <fenv.h>
int main()
{ fesetround(FE_TONEAREST);
printf("You should see 2 : %f\n",rint(1.5));
printf("You should see 2 : %f\n",rint(2.5)); /* Pelles C -> 3 */
printf("You should see 4 : %f\n",rint(3.5));
return(0);
}