Floating Point Numbers
They express numbers with decimals and/or exponents. They can
include either a decimal point, an e character (that expresses "by ten at the Xth height",
where X is an integer value that follows the e character), or both a decimal point and an
e
character:
3.14159 // 3.14159 6.02e23 // 6.02 x 10^23 1.6e-19 // 1.6 x 10^-19 3.0 // 3.0 |
The default type for floating point literals is double. If you explicitly want to express a float or long double numerical literal, you can use the f or l suffixes respectively:
3.14159L // long double 6.02e23f // float |
No comments:
Post a Comment