I am doing some fairly simple math in visual studio 2019 with C, but floats are returning with incorrect values. While debugging I simplified the example down to just a quick return, but something is still off because there's no math included in my example. Is there something missing from my environment?
NOTE: I can return integers with no problem.
#include <stdio.h>
int main() {
float e = simple_float();
printf("after return : %.2f\n", e);
return 0;
}
float simple_float() {
float a = 5.63129;
printf("before return : %.2f\n", a);
return 5.63129;
}
But the output is displaying as such:
