### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Introduction to Numerical Computing MATH 375

UNM

GPA 3.78

### View Full Document

## 74

## 0

## Popular in Course

## Popular in Mathematics (M)

This 26 page Class Notes was uploaded by Julianne Welch on Wednesday September 23, 2015. The Class Notes belongs to MATH 375 at University of New Mexico taught by Staff in Fall. Since its upload, it has received 74 views. For similar materials see /class/212180/math-375-university-of-new-mexico in Mathematics (M) at University of New Mexico.

## Similar to MATH 375 at UNM

## Reviews for Introduction to Numerical Computing

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/23/15

Math375 Fall 2005 Numbers and Formats Vageli Coutsias Introduction 1 1 O or machine epsilon eps 2220446049250313e016 How does matlab produce its numbers Where we learn about number formats truncation errors and roundoff Matlab real number formats format long default for 71 pi 314159265358979 format short pi 31416 format short 6 pi 314166000 format long 6 pi 3141592653589793e000 Floatingpoint numbers d 3 Base 0r radix x 1 I 2 I 3 I I l 6 9 z 3 t Precision LU Exponent range 03d S li1pd1 720 L S e S U SYSTEM Base Precision Low Exp UpperExp IEEE SP 2 24 126 127 IEEE DP 2 53 1022 1023 Cray 2 48 1 6383 1 6384 HP Calc 1O 12 499 499 IBM mainfr 16 6 64 63 x 1SOd1d2dt e 1s md1d2dt The set F of fp numbers Basis 3 Significantdigits t Range U L FB t U L F2 53 1021 1024 is the IEEE standard 8252005 sign bit it is assumed d1 1 so only need d2d53 exponent 11 bits 8252005 6 IEEE double precision standard If E2047 and F is nonzero then VNaN quotNot a number If E2047 and FO and SO1 then Vnf nf If EO and FO and SO1 then V00 If 0ltElt2047 then V1S 2 E1023 1F where quot1Fquot denotes the binary number created by prefixing F with an implicit leading 1 and a binary point If EO and F is nonzero then V1S 2 1022 0F These are quotunnormalizedquot values 8252005 00010 11 00011 Cl contains unnormalized values as allowed eg in IEEE standard 8252005 8 Floating point numbers Under ovglevel UFL BH Over owlevel 2 OFL BU 1 3 8 1 eps H The machine precision is the smallest nuber e such that l8gtl IEEE Sp8 2 23 z10 7 IEEEdp8 2 52 z10 16 Machine epsilon The distance from 1 to the next larger float 8 eps 2 6H Gives the relative error in representing a real number in the system F lx lxll lt1 lxl 2 8252005 RELATIVE ROUNDOFF ERROR 1o Machine epsilon computed a 1 b 1 while ab a b bl2 end b b 1110223024625157eO16 shows that ab a is satisfied by numbers b not equal to O here b epsl2 is the largest such number for a 1 8252005 11 oOver ow does not only cause programs to crash Arianne V s short maiden ight on 7496 was due to a oating exception FLOAT 9 INTEGER During the conversion of a 64bit floating point number to a 16bit signed integer Caused by the float being outside the range representable by such integers The programming philosophy employed did not guard against software errorsa fatal assumption COMPLEX NUMBERS z x iy x Rez is the real part y mz is the imaginary part iquot2 1 is the imaginary unit polar form Z pew poos isin 6 complex conjugate E x iy 8252005 14 Matlab commands gtgt 2 3i4 gtgt Cartesian form x realz y imagz gtgt Polar form theta anglez rho absz So 2 abszcosanglez isinangez xiy conjz 8252005 15 The complex plane z12i 31i i compassz r 0 defines an array of complex numbers which are plotted as vectors in the xy plane 8252005 16 Roots of complex numbers 8252005 X 1 Xquot13 ans 05000 08660i Matlab assumes complex arithmetic and returns automatically the root with the smallest phase angle the other two roots are 1 and 05000 08660i Types of errors in numerical computation Roundoff errors Pi 314159 Pi 31415926535897932384626 Truncation errors Cos x 1 xquot22 Cos x 1 xquot22 xquot44 Errors usually accumulate randomly random walk But they can also be systematic and the reasons may be subtle 1 05 f o 705 39 1 1 1 1 X inspace1210quot81210quot8401 f Xquot77Xquot621Xquot535Xquot435Xquot3 21Xquot27X1 plotxf EZEZEIEIE CANCELLATION ERRORS 1g g 1x7x21x35x35x21x7x p0tXg 8252005 20 x10 15 8252005 h X139A7 p0tXh 21 quotMy MILE a 415 x inquot L Wmlrawl h39 I If 391 1 I I ll 11 1 plotxhxgxf 8252005 21 0 22 2 for k 229 zk1 2quotk12114quot1kzkquot2quot12quot1l2 end semilogy1 30abszpipi 8252005 23 IARITHMETIC OPERATIONS and symbols 1 2 3 4 5 6 format long longe format short short e suppress output ending commands with Complex real imag conj i j angle abs compass Machine constants and special variables eps realmin realmax pi loops loop until condition while condition true end 8252005 24 Summary Roundoff and other errors Formats and floating point numbers Complex numbers References Higham amp Higham Matlab Guide SIAM SIAM News 298 1098 Arianne V failure B5 Trailer httpwwwscifiComb5rangers

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "I made $350 in just two days after posting my first study guide."

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.