A floating point constant is a single real number.It includes integer portion, a decimal point,
fractional point and a exponent.While representing a floating point constant, either the digits
before the decimal point (the integer portion) or the digits after the decimal point (the fractional
portion ) can be omitted but not both.The decimal point can be omitted if an exponent is
included.An exponent is represented in powers of 10 in decimal system.
eg:
12.34 is a valid floating point (real) constant.It can be represented in exponent form as follows:
1.234E1 -> 1.234*10^1 -> 12.34
1234E2 -> 1234*10^(-2) -> 12.34
0.1234e2 -> 0.1234*10^2 -> 12.34
The letter E or e is used to represent the floating point constant in exponent form.
fractional point and a exponent.While representing a floating point constant, either the digits
before the decimal point (the integer portion) or the digits after the decimal point (the fractional
portion ) can be omitted but not both.The decimal point can be omitted if an exponent is
included.An exponent is represented in powers of 10 in decimal system.
eg:
12.34 is a valid floating point (real) constant.It can be represented in exponent form as follows:
1.234E1 -> 1.234*10^1 -> 12.34
1234E2 -> 1234*10^(-2) -> 12.34
0.1234e2 -> 0.1234*10^2 -> 12.34
The letter E or e is used to represent the floating point constant in exponent form.
No comments:
Post a Comment