Hi,
I am a C++ beginner, I have received some prompt replies at the site. So here I am again.
As the subject indicates, it is about the range of some numerical data type. I have a fair understanding about the range of char, short, int, and long, but I am confused about float, double, or long double.
For example, in a table ( I encountered, float has a range of 3.4e +/-38(7 digits).
Question 1
Integers have signed and unsigned, so I am able to use negative numbers. But how do I use negative float numbers, such as -7.456 or -0.023, if the range doesn't even include negative numbers?
Question 2
What does the "7 digits" inside the parentheses refer to? the range is (1.06730515 × 10^-16) to )1.08310168 × 10^17).
Thanks
I am a C++ beginner, I have received some prompt replies at the site. So here I am again.
As the subject indicates, it is about the range of some numerical data type. I have a fair understanding about the range of char, short, int, and long, but I am confused about float, double, or long double.
For example, in a table ( I encountered, float has a range of 3.4e +/-38(7 digits).
Question 1
Integers have signed and unsigned, so I am able to use negative numbers. But how do I use negative float numbers, such as -7.456 or -0.023, if the range doesn't even include negative numbers?
Question 2
What does the "7 digits" inside the parentheses refer to? the range is (1.06730515 × 10^-16) to )1.08310168 × 10^17).
Thanks