Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help me a code to solve this question? Also I need a comments on each section of codes The number 1 would be

Can you help me a code to solve this question? Also I need a comments on each section of codes

image text in transcribed

The number 1 would be stored with the implied leading 1, an exponent of 0 (the actual number stored is 127, remember the shift), and the fractional bits would all be zero. The number 2 would be stored with the implied leading 1, an exponent of 1, and the fractional bits would all be zero. What is important for this assignment is realizing the value of the last bit in the significand. For the 1, the last bit is 2-23 = 1.19e-7. This is about 1/ten millionth. For 2, it is 2-23 = 2.38e-7. Write a Fortran program with at least two variables of type real*4. Set one of them equal to 1.0 and the other to 2.0. Next, write a do loop that iterates 10 million times. In the loop, add 1.e-7 (one ten-millionth) to each variable (The variable should appear on both sides of the equal sign.) After the loop, print out each variable with a label. The variables must be of type real*4. The number 1 would be stored with the implied leading 1, an exponent of 0 (the actual number stored is 127, remember the shift), and the fractional bits would all be zero. The number 2 would be stored with the implied leading 1, an exponent of 1, and the fractional bits would all be zero. What is important for this assignment is realizing the value of the last bit in the significand. For the 1, the last bit is 2-23 = 1.19e-7. This is about 1/ten millionth. For 2, it is 2-23 = 2.38e-7. Write a Fortran program with at least two variables of type real*4. Set one of them equal to 1.0 and the other to 2.0. Next, write a do loop that iterates 10 million times. In the loop, add 1.e-7 (one ten-millionth) to each variable (The variable should appear on both sides of the equal sign.) After the loop, print out each variable with a label. The variables must be of type real*4

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 Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Who or what is affected by this situation?

Answered: 1 week ago

Question

How important is this situation to the organizations mission?

Answered: 1 week ago