Question

In a fashion similar to that in Fig. 3.11, write a short program to determine the...

In a fashion similar to that in Fig. 3.11, write a short program to determine the smallest number, xmin, used on the computer you will be employing along with this book. Note that your computer will be unable to reliably distinguish between zero and a quantity that is smaller than this number.

Homework Answers

Answer #1

The figure 3.11 in the text book is the pseudo code that determine that machine epsilon for the binary computer.

Below the mat lab code code which is written in the similar fashion to determine the smallest number X_min

A=1

While (1)

If a<+0,break,end

X min=A;

A=a/2;

End

The execute the above script code,there are following steps:

  • First open the matlab Script editor
  • Now write the above code into the editor.
  • Now save this script as getmin.m
  • Now run this file info the MATLAB commend window promot with getmin.m file name.
  • Out put:
  • The following output gets display after the execution of the above code
  • Ans=4.9407e-324


Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The following code to run as the described program on python. The extra test file isn't...
The following code to run as the described program on python. The extra test file isn't included here, assume it is a text file named "TXT" with a series of numbers for this purpose. In this lab you will need to take a test file Your program must include: Write a python program to open the test file provided. You will read in the numbers contained in the file and provide a total for the numbers as well as the...
1)Write a program that asks a user for a number. If (and only if) the number...
1)Write a program that asks a user for a number. If (and only if) the number is greater than zero print “The number is valid” 2)Write a program that asks a user for a grade. If (and only if) the grade is greater than zero and less than 101, print “The grade is valid” 3)Write a program that asks a user how many widgets they want to buy and prints out what the user should pay. Widgets costs 10 dollars....
Need in Java coding Write a program that will allow users to enter different types of...
Need in Java coding Write a program that will allow users to enter different types of books into the program, and at the end print out everything that the user entered. Allow the user to enter as many books as they want. Please collect the following information and break down the classes as follows using inheritance/classes. I have added the extra properties that each class should include. Book types: Paper Book (nothing extra) Comic Book (issue number) Magazine (publisher, issue...
In this assignment you will write a program that compares the relative strengths of two earthquakes,...
In this assignment you will write a program that compares the relative strengths of two earthquakes, given their magnitudes using the moment magnitude scale. Earthquakes The amount of energy released during an earthquake -- corresponding to the amount of shaking -- is measured using the "moment magnitude scale". We can compare the relative strength of two earthquakes given the magnitudes m1 and m2 using this formula: f=10^1.5(m1−m2) If m1>m2, the resulting value f tells us how many times stronger m1...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
The following is the description of sales and cash receipts for the Lady’s Fashion Fair, a...
The following is the description of sales and cash receipts for the Lady’s Fashion Fair, a retail store dealing in expensive women’s clothing. Sales are for cash or credit, using the store’s own billing rather than credit cards. Each salesclerk has her own sales book with prenumbered, three-copy, multicolored sales slips attached, but perforated. Only a central cash register is used. It is operated by the store supervisor, who has been employed for 10 years by Alice Olson, the store...
PART I- TRUE-FALSE QUESTIONS Following 15 questions are True-False Questions. Write ‘T’ for True and ‘F’...
PART I- TRUE-FALSE QUESTIONS Following 15 questions are True-False Questions. Write ‘T’ for True and ‘F’ for False in the True / False Answer Box. Each question carries ‘2’ mark. Excess capacity characterizes firms in monopolistically competitive markets, even in situations of long-run equilibrium. A competitive market will typically experience entry and exit until accounting profits are zero A monopolist produces an efficient quantity of output but it is still inefficient because it charges a price that exceeds marginal cost...
Write a Python 3 program called “parse.py” using the template for a Python program that we...
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file. Name your output file “output.txt”. Build your program using a main function and at least one other function. Give your input and output file names as command line arguments. Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:...
For a C program hangman game: Create the function int setup_game [int setup_game ( Game *g,...
For a C program hangman game: Create the function int setup_game [int setup_game ( Game *g, char wordlist[][MAX_WORD_LENGTH], int numwords)] for a C program hangman game. (The existing code for other functions and the program is below, along with what the function needs to do) What int setup_game needs to do setup_game() does exactly what the name suggests. It sets up a new game of hangman. This means that it picks a random word from the supplied wordlist array and...
Point/Counterpoint from chapter 14. Take a stand. Do you agree or disagree? Write a minimum of...
Point/Counterpoint from chapter 14. Take a stand. Do you agree or disagree? Write a minimum of one paragraph for each one. Chapter 14 Exporting E-waste: A Fair Solution? Point Yes Exporting is always and everywhere a win-win situation: The more companies and countries export, the more they improve market efficiency. Exporting enables companies to increase sales, improve productivity, and diversify activities. Likewise, exporting helps countries generate jobs, accelerate innovation, and improve living standards. In broader terms, it promotes connections among...