Computer Science - Computer Fundamentals - Discussion
Discussion Forum : Computer Fundamentals - Section 11 (Q.No. 34)
34.
The accuracy of the floating point numbers representable in two 16 bit words of a computer is approximately
Discussion:
5 comments Page 1 of 1.
Aneeza said:
8 years ago
It's quite simple: a 32-bit IEEE-754 float has 23+1 bits for the mantissa (AKA significant, in IEEE-speak). The size of the mantissa more or less determines the number of representable digits.
To get the number of significant digits, simply calculate log10(224), which is approx. 7.22. (or, if you think that only 23 bits count, as the top bit is fixed anyway, you get log10(223), which is approx. 6.92). So in effect, you have about 6-7 significant digits, for normalised values.
The same can be done for 64-bit floating point values (doubles). They have 52 (or 53) bits to store the mantissa, so calculate log10(252), which is approx. 15.6 (or 15.9 for 53 bits), which gives you about 15 significant digits.
To get the number of significant digits, simply calculate log10(224), which is approx. 7.22. (or, if you think that only 23 bits count, as the top bit is fixed anyway, you get log10(223), which is approx. 6.92). So in effect, you have about 6-7 significant digits, for normalised values.
The same can be done for 64-bit floating point values (doubles). They have 52 (or 53) bits to store the mantissa, so calculate log10(252), which is approx. 15.6 (or 15.9 for 53 bits), which gives you about 15 significant digits.
Preeti said:
8 years ago
Can you please explain it?
Shewangizaw Bogale said:
9 years ago
Can anyone explain it?
Ashwani said:
9 years ago
Please let me explain how it works?
Shubham aggarwal said:
10 years ago
Sir, please explain breifly.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers