Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Floating Point Numbers and Machine Precision in Python Floating Point Numbers and Machine Precision. Start with x = 1.0 and keep dividing it by 2

image text in transcribed Floating Point Numbers and Machine Precision in Python

Floating Point Numbers and Machine Precision. Start with x = 1.0 and keep dividing it by 2 until you get 0.0. If n +1 is the number of such divisions, then 1/2^n is the smallest number representable in the floating point format in the programming environment of your choice. Similarly, if at the stage m +1,1.0 + x 1.0, then 1.0 + 1/2^m is the floating point number closest to 1.0. Now start doubling 1.0 until you get + INF (or NaN) at some stage, N +1: then 2^N (2 - 1/2^m) is the largest floating point number. Obtain m, n, and N. Discuss your findings: deduce the numbers of bits that are used in your environment for the exponent and significand of the floating point numbers

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

Step: 3

blur-text-image

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions