115-2010-HW1 - Please provide a copy of the double...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
University of California, Davis Department of Applied Science Fall 2010 David M. Rocke Numerical Methods EAD 115 September 29, 2010 Homework Assignment 1 Due October 6, 2010 1. Determine machine epsilon in both double and single precision for Excel Visual Basic. Here is a program to do this in single precision: Option Explicit Function MachEps() As Single Dim eps As Single, eps1 As Single, eps2 As Single eps = 1 Do eps1 = 1 + eps eps2 = eps1 - 1 If (eps2 <= 0) Then Exit Do End If eps = eps / 2 Loop MachEps = eps End Function
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Please provide a copy of the double precision code, and the two machine epsilon values for single and double precision. 2. Do the following problems from the text: 4.3, 4.4, 4.12, 4.19 on pages 105106. For problem 4.19, compute the derivatives for-2 . 00 ,-1 . 75 ,-1 . 50 , . . . , 2 . 00 using an Excel spreadsheet. Graph the exact derivative and each of the three approximations for the rst derivative on one graph, then do the same for the second derivative....
View Full Document

Ask a homework question - tutors are online