Real constants:
Real constant are often called floating point constant.
The real constant could be written in two forms, fraction form & exponential from.
Real for constructing real constant in exponential form are as:
1] A real constant must have at least one digit.
2] It must havedigital point.
3] The mentissa part and the exponential should be separated by letter " e " or E .
3] It must could be +ve or -ve default sign is +ve.
4] No commas or blank space are allowed within real constant.
5] Ex: +325.34, 10.0, -326.4, -48.5697
The exponential form of representation of real real constant is usually used when the value of the constant is either too small or too large.
In exponential forma real constant is reprented in to two parts.
The part appearing before " e " is called mantissa, where as the part following " e " is called exponent.
rules for constructing real constant.
1) The mentissa part and the exponential part should be separated by letter " e " or "E".
2) The mentissa part may have +ve or -ve sign,default sign is +ve.
3) Exponent must have at least one digit, which must be +ve or -ve , default sign is +ve.
4) Range of real constant in exponentiation is -3.4e38 to 3.4e38
5) Ex: 3.2e-5, 4.1e8, -0.2E+3, -3.2e-5.
Good
ReplyDelete