Home > Back-end >  C primer plus the first programming question in the third chapter
C primer plus the first programming question in the third chapter

Time:06-06

Write a program to check the system on how to handle integer and floating point Numbers overflow and underflow, which could explain in detail the whole process for me

CodePudding user response:

#include There are int the definition of the maximum and minimum
INT_MAX and INT_MIN
For maximum plus 1, minimum minus 1 can see effect of overflow

IEEE754 floating-point representation method,
The representation of a float type data range is 3.4 * 10 ^ ~ + 3.4 * 10 ^ 38, 38
Double - 1.7 * 10 ^ - 308 ~ 1.7 * 10 ^ 308
Long double - 1.2 * 10 ^ - 4932 ~ 1.2 * 10 ^ 4932.
Their times 10, output again saw floating overflow

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related