This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Jaime Frade Computational Finance: Dr. Kopriva Homework #1 0. Executive Summary There are several problems being solved in this homework assignment, centralized around one common theme, how different computers represent and perform operations on numerical values. For future calculations, I must find what standard my computer(s) was given. I will check if my computer uses the IEE 754 floating point standard system by comparing the machine epsilon, the largest, and smallest floating point numbers. After writing a reusable class in C++ that returns the correct floating point constant, I found that my computer uses the IEEE standard. 1. Statement of Problem Write a program, in which I will create a reusable class that will return the constants for the machine epsilon, the largest and smallest floating point number that a computer uses. From here, I will determine if the computations of my computer use IEEE 754 standard. (For program see appendix) 2. Description of the Mathematics In order to determine how significant the error in computations due to rounding is, I will need to determine the relative error due to rounding. Assuming rounding error, because this is at most 1 2 of chopping error, the upper bound on this error, the machine epsilon, , then = β 1- t 2 (1) where β be the base, ( β ∈ Z ++ ), and t gives the number of digits of M, the matissa , is. To check if a computer uses the IEEE standard in single and double precision, I need to determine the upper and lower bounds of the floating point number, as well as, the machine epsilon. Assuming IEEE, ( β =2 and t = 23) and from (1), for the floating point numbers in single precision: FL ( x ) = (- 1) s 2 E- 127 1 . M (2) where the sign ( s = 0 or 1) determines the sign and 0 < E < 255. In double precision, FL ( x ) = (- 1) s 2 E- 1023 1 . M (3) From IEEE 754 floating point standard, the values that are inputed into (2) and (3), for a single precision with 32-bit and double precision having 64-bit storage are as follows: SINGLE DOUBLE MANTISSA (M) 23 52 EXPONENT ( E ) 8 11 SIGN ( s ) 1 1 • The smallest number in the range in IEEE for single precision, from lecture, is determined...
View Full Document
- Fall '10
- single precision, machine epsilon, smallest spacing