Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*****c++**** Following the logic we used to justify the range of integer numeric data types, try to create the smallest and greatest possible floating-point numbers

image text in transcribed*****c++****

Following the logic we used to justify the range of integer numeric data types, try to create the smallest and greatest possible floating-point numbers in float and double data types to get the ranges shown below. Declaration Size Supported number range float x; 32 bits -3.4x1038 to 3.4x1038 double x; 64 bits -1.7x10308 to 1.7x10308 The number of bits used for each part in this representation (IEEE 754) is as follows: float: sign(1 bit), exponent(8 bits), mantissa(23 bits) double: sign(1 bit), exponent(11 bits), mantissa(52 bits) In both float and double, all-1 exponent (11111111, 11111111111) is reserved for Non or Infinity. As a result, the greatest exponents that we can have in float and double are 11111110 and 11111111110 respectively. Also, the exponent bias for double is 1023. Submission and rubric: 1. Generating the smallest and greatest numbers in float and get the right range for float (5 points) 2. Generating the smallest and greatest numbers in float and get the right range for double (5 points) 3. The deadline is Monday, March 8, at 11:59 pm. Late submissions are not accepted. 4. Upload a neatly handwritten version of your solution or type your answers if you want

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago