Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing the code to finish this assignment in jupyter notebook using python 3. M4650 IHW1 Last Checkpoint: 18 hours ago (autosaved Logout

I need help writing the code to finish this assignment in jupyter notebook using python 3.

image text in transcribed

M4650 IHW1 Last Checkpoint: 18 hours ago (autosaved Logout Control Pan File Edit View Insert Cell Kernel Widgets Help Not Trusted Python H Run CMarkdown Memory: 196 / 2048 M4650, Individual Homework 1 Let the function f(x, y) = (x-Vy Fix y-1 and let x 1 + small but greater than machine . Show that * Write code to plot f(x, y) versus . Let range from single precision epsilon to double precision epsilon. Also plot the upper and lower bounds from the first part. * Come up with a different arithmetic set of operations that gives you the same f(x, y) but is more accurate. Plot this function for the same range of In [1]: #To get you started! import numpy as np import matplotlib.pyplot as plt def f(x,y): return np.sqrt (x)-np.sqrt (y) #simple python function N-np.arange (-52, -22) print (N) #Note where N stops! delta-np.power (2.0,N) #The 2.0 s needed, print (delta) try without! fxy-f(1-delta, 1) #Why does this work? -52-51-50-49 -48 -47-46 -4544 -43 -42 -41 -40 -39 -38 -37-36-35 [2.22044605e-16 4.44089210e-16 8.88178420e-16 1.77635684e-15 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23] 3.55271368e-15 7.10542736e-15 1.42108547e-14 2.84217094e-14 5.68434189e-14 1.13686838e-13 2.27373675e-13 4.54747351e-13 9.09494702e-13 1.81898940e-12 3.63797881e-12 7.27595761e-12 1.45519152e-11 2.91038305e-11 5.82076609e-11 1.16415322e-10 2.32830644e-10 4.65661287e-10 9.31322575e-10 1.86264515e-09 3.72529030e-09 7.45058060e-09 1.49011612e-08 2.98023224e-08 5.96046448e-08 1.19209290e-07] In [1]:plt.plot (delta, fxy) NameError Traceback (most recent call last) Kipython-input-1-055c5392E257> in 1 plt.plot (delta, fxy) NameError: name 'pit' is n t defined

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

How do market participants gauge the default risk of a bond issue?

Answered: 1 week ago