Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JavaScript works in IEEE double precision floating point. You can compute m to the power n where m and n are both integers with Math.pow(m,n).
JavaScript works in IEEE double precision floating point. You can compute m to the power n where m and n are both integers with Math.pow(m,n). Also, show(a,b,...) can be used to display the value of a, b, .... This will display properly the values for Infinity and negative Infinity, NaN, etc. When the values underflow, they are set to 0.
JavaScript works in IEEE double precision floating point. You can compute m to the power n where m and n are both integers with Math.pow (m,n). Also, ahow (a,b,...) can be used to display the value of a, b, This will display properly the values for Infinity and negative Infinity, NaN, etc. When the values underflow, they are set to 0. a. The largest integer M for which 2 is a finite (double precision) noating point number is M (Hint: Use the JavaScript calculator, with a loop that prints out a sequence of values.) b. The smallest (negative) integer m for Which 2m is a non-zero fioating point number is m (Hint: See the last hint.) C. The exponent field of a double precision floating point number is 11 bits wide, so there are possible non negative integer values that can be stored in this field, the values range from zero to The floating point numbers positive infinity and negative infinity as well as the not-a-number values NaN have an exponent field with value Plus and minus zero as well as all the Subnormal (also known as denommalized) numbers have an exponent field with value The remaining values in the exponent field are for numbers. Anommalized numbers value is the product of the sign (a 1 bit field), the significand (53 bit value stored in a 52 bit field), and two to the sum of the value of the exponent field and the bias. For double precision, the bias is d. So, how do you represent the smallest positive number? It would be a subnormal number. Its exponent field would have 11 zero bits, the sign bit would be 0, and the significand field would be all zeros except for 52 the lowest order bit which would be The significand field has 52 bits, but because one has a su bnormal number, the implied bit (to the left of the radix point) is 0 so the value of the significand would be 2 The exponent field would be 0, but for subnormal numbers the exponent value is computed as if the field actually had the smallest possible value of 1. Subtracting the bias gives: 1 1023 022. So the value 1022 would be the product of the significand and 2 and this should agree with the experimentally determined value you computed for part b of thisStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started