Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FLoat Datatype

Status
Not open for further replies.

cwm22

Programmer
May 7, 2006
1
0
0
US
I understand that a standard float datatype has 7 decimal points of precision in visual c++, but what is the range? What are the maximum and minimum values for a float datatype?
 
Well here's what the MSDN says for the range:
MSDN said:
3.4E +/- 38
I don't speak "calculatorese" so don't ask me what that number means in decimal. ;-)
 
3.4E+38 means 340,000,000,000,000,000,000,000,000,000,000,000,000.0

3.4E-38 means 0.000000000000000000000000000000000000034

In other words 3.4E+38 means 3.4 with the decimal point shifted 38 positions to the right.

3.4E-38 means 3.4 with the decimal point shifted 38 positions to the left.

 
> but what is the range?
The ranges of all datatypes are in the C header file limits.h (or climits, if you're using new C++)



--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top