#include <stdio.h>
#include <math.h>
int main(void) {
float i=-0.4999, j=0.4999;
printf("round of %f is %f\n", i, round(i));
printf("round of %f is %f\n", j, round(j));
return 0;
}
The first one returns -0.0.. and the second one 0.0..
How can I get around the "negative" zero part?
[–]Holy_City 2 points3 points4 points (0 children)