Question

Write a script to find $N_{min}$, the smallest possible value for $N$ in Eq. (1) so that ln(5) evaluated using myLog with Matlab's default double precision arithmetics is exact when written as a half-precision binary floating point number in engineering notation. Use decimal2binary developed in Module 1 to answer this question and do not use Matlab's half(). Just setting $N_{min}$ without an algorithm to find its value will not give any credit. Notes for the MatlabGrader script submission: • Comment out clear or clear all in your script when submitting to MatlabGrader. • Store the answer in the variable Nmin. • Do not include the source code for myLog or decimal2binary in your submission. Correct versions are used automatically on Matlab Grader. Required submission

          Write a script to find $N_{min}$, the smallest possible value for $N$ in Eq. (1) so that ln(5) evaluated using myLog with Matlab's default double precision arithmetics is exact when written as a half-precision binary floating point number in engineering notation. Use decimal2binary developed in Module 1 to answer this question and do not use Matlab's half(). Just setting $N_{min}$ without an algorithm to find its value will not give any credit.
Notes for the MatlabGrader script submission:
• Comment out clear or clear all in your script when submitting to MatlabGrader.
• Store the answer in the variable Nmin.
• Do not include the source code for myLog or decimal2binary in your submission. Correct versions are used automatically on Matlab Grader.
Required submission
        
Show more…
Write a script to find Nmin, the smallest possible value for N in Eq. (1) so that ln(5) evaluated using myLog with Matlab's default double precision arithmetics is exact when written as a half-precision binary floating point number in engineering notation. Use decimal2binary developed in Module 1 to answer this question and do not use Matlab's half(). Just setting Nmin without an algorithm to find its value will not give any credit.
Notes for the MatlabGrader script submission:
• Comment out clear or clear all in your script when submitting to MatlabGrader.
• Store the answer in the variable Nmin.
• Do not include the source code for myLog or decimal2binary in your submission. Correct versions are used automatically on Matlab Grader.
Required submission

Added by Melody M.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Write a script to find Nmin, the smallest possible value for N in Eq. (1) so that ln(5) evaluated using myLog with Matlab's default double precision arithmetic is exact when written as a half-precision binary floating point number in engineering notation. Use decimal2binary developed in Module 1 to answer this question and do not use Matlab's half(). Just setting Nmin without an algorithm to find its value will not give any credit. Notes for the MatlabGrader script submission: Comment out clear or clear all in your script when submitting to MatlabGrader. Store the answer in the variable Nmin. Do not include the source code for myLog or decimal2binary in your submission. Correct versions are used automatically on Matlab Grader.
Close icon
Play audio
Feedback
Powered by NumerAI
Kathleen Carty Ivan Kochetkov
Jennifer Stoner verified

Sri K and 98 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
determining-rigorous-estimates-of-the-accuracy-of-the-answers-obtained-by-eulers-method-can-be-quite-challenging-problem-the-common-practice-is-to-repeatedly-approximate-function-values-usin-22303

Determining rigorous estimates of the accuracy of the answers obtained by Euler's method can be quite a challenging problem. The common practice is to repeatedly approximate function values, using smaller and smaller values of h, until the digits of the computed values stabilize at the required accuracy level. Use this strategy to find a value of h for Euler's method such that x(1) is approximated to within ± 0.01, if x(t) satisfies the following initial value problem. Also find, to within ± 0.02, the value of t₀ such that x(t₀) = 1. dx/dt = 1 + x², x(0) = 0 Find the largest value of h for Euler's method such that x(1) is approximated to within ± 0.01. Since x(1) should be approximated to two decimal places, start with h = 0.01. Choose the correct answer below. A. h = 0.000625 B. h = 0.0025 C. h = 0.01 D. h = 0.005 E. h = 0.0003125 F. h = 0.00125 Find, to within ± 0.02, the value of t₀ such that x(t₀) = 1. t₀ = 0.79 ± 0.02 (Round to two decimal places as needed.)

Sri K.

write-a-matlab-function-that-performs-the-xed-point-iteration-for-solution-of-n-equations-in-n-unknowns-where-n-may-be-greater-than-one-this-function-should-call-another-function-that-evalua-61023

Write a MATLAB function that performs the fixed-point iteration for the solution of n equations in n unknowns, where n may be greater than one. This function should call another function that evaluates the right-hand sides of the equations (which must be in the correct form for the fixed-point method, of course). Apply your code to find an approximate solution of the set of equations x1 = exp[-x1^2/4] + 1/4 * arctan(x2 - x1), 2/5 * (sin(x1) + cos(x2)) - x2 = 0. More specifically, start from x0 = (5,-5)T, and continue for 15 steps, obtaining x15. For k ∈ {1,2,...,14}, compute |xk+1 - xk|/|xk - xk-1| (where |x| is the Euclidean norm of x, i.e., the length of the vector x). Use this to estimate what you would expect |x25 - x24| would be. Compare this with what you get if you run the code all the way to x25.

Akash M.

determining-rigorous-estimates-the-accuracy-of-the-answers-obtained-by-eulers-method-can-be-quite-challenging-problem-the-common-practice-repeatedly-approximate-function-values-using-smaller-71412

Determining rigorous estimates of the accuracy of the answers obtained by Euler's method can be quite a challenging problem. The common practice is to repeatedly approximate function values, using smaller and smaller values of h, until the digits of the computed values stabilize at the required accuracy level. Use this strategy to find a value of h for Euler's method such that x(1) is approximated to within ± 0.01, if x(t) satisfies the following initial value problem. Also find, to within ± 0.02, the value of t0 such that x(t0) = 1. dx/dt = 1 + x^2, x(0) = 0 Find the largest value of h for Euler's method such that x(1) is approximated to within ± 0.01. Since x(1) should be approximated to two decimal places, start with h = 0.01. Choose the correct answer below. A. h = 0.000625 B. h = 0.005 C. h = 0.01 D. h = 0.0025 E. h = 0.0003125 F. h = 0.00125 Find, to within ± 0.02, the value of t0 such that x(t0) = 1. t0 = ± 0.02 (Round to two decimal places as needed.)

Linda W.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,027 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,923 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,648 solutions

*

Transcript

-
00:01 1 dx by d t is equal to 1 plus x square x 0 d t is equal to plus x square x d t is equal to f t x is equal to 1 plus x square also d t is equal to 0 0 and x 0 is equal to 0 so f0 is 0 is equal to 1 x1 is equal to x0 plus f0 so f0 h is equal to 0 .01 x1 is equal to 0 plus 0 in bracket 0 .1 x1 x1 is equal to 0 .0 for h is equal to 0 .0 1 x1 x1 is equal to 0 .0 1.
01:41 Next to find 2 with in closer minus 0 .02...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever