Author Topic: Floating point overflow results  (Read 688 times)

Offline jordantoto

  • Member
  • *
  • Posts: 6
Floating point overflow results
« on: November 10, 2018, 08:18:37 am »

int main(void)
   float toobig=FLT_MAX*100.0f;


   return 0;

#define FLT_MAX      3.402823466e+38F

Why is this code on pelles C the result of the float type variable toobig is larger than the float maximum? Why does overflow overflow display inf?

It looks like pelles C directly takes the result of toobig as the double type.