Download presentation
Presentation is loading. Please wait.
Published byRosaline Preston Modified over 9 years ago
1
14/02/2016 http://numericalmethods.eng.usf.edu 1 Floating Point Representation Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker Presented by: دکتر ابوالفضل رنجبر نوعی http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates
2
Floating Point Representation http://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu 14/02/20162http://numericalmethods.eng.usf.e du
3
3 Floating Decimal Point : Scientific Form 14/02/2016
4
http://numericalmethods.eng.usf.edu4 Example The form is or Example: For 14/02/2016
5
http://numericalmethods.eng.usf.edu5 Floating Point Format for Binary Numbers 1 is not stored as it is always given to be 1. 14/02/2016
6
http://numericalmethods.eng.usf.edu6 Example 9 bit-hypothetical word the first bit is used for the sign of the number, the second bit for the sign of the exponent, the next four bits for the mantissa, and the next three bits for the exponent We have the representation as 001011101 Sign of the number mantissa Sign of the exponent exponent 14/02/2016
7
http://numericalmethods.eng.usf.edu7 Machine Epsilon Defined as the measure of accuracy and found by difference between 1 and the next number that can be represented 14/02/2016
8
http://numericalmethods.eng.usf.edu8 Example Ten bit word Sign of number Sign of exponent Next four bits for exponent Next four bits for mantissa 0000000000 0000000001 Next number 14/02/2016
9
http://numericalmethods.eng.usf.edu9 Relative Error and Machine Epsilon The absolute relative true error in representing a number will be less then the machine epsilon Example 10 bit word (sign, sign of exponent, 4 for exponent, 4 for mantissa) 0101101100 Sign of the number mantissa Sign of the exponent exponent 14/02/2016
10
IEEE 754 Standards for Single Precision Representation http://numericalmethods.eng.usf.edu 14/02/201610http://numericalmethods.eng.usf.e du
11
IEEE-754 Floating Point Standard Standardizes representation of floating point numbers on different computers in single and double precision. Standardizes representation of floating point operations on different computers. 14/02/201611http://numericalmethods.eng.usf.e du
12
One Great Reference What every computer scientist (and even if you are not) should know about floating point arithmetic! http://www.validlab.com/goldberg/paper.pdf 14/02/201612http://numericalmethods.eng.usf.e du
13
13 IEEE-754 Format Single Precision 32 bits for single precision 00000000000000000000000000000000 Sign (s) Biased Exponent (e’) Mantissa (m) 14/02/201613http://numericalmethods.eng.usf.e du
14
14 Example#1 11010001010100000000000000000000 Sign (s) Biased Exponent (e’) Mantissa (m) 14/02/201614http://numericalmethods.eng.usf.e du
15
15 Example#2 ???????????????????????????????? Sign (s) Biased Exponent (e’) Mantissa (m) Represent -5.5834x10 10 as a single precision floating point number. 14/02/201615http://numericalmethods.eng.usf.e du
16
16 Exponent for 32 Bit IEEE-754 8 bits would represent Bias is 127; so subtract 127 from representation 14/02/201616http://numericalmethods.eng.usf.e du
17
Exponent for Special Cases Actual range of andare reserved for special numbers Actual range of 14/02/201617http://numericalmethods.eng.usf.e du
18
Special Exponents and Numbers all zeros all ones smRepresents 0all zeros 0 1 -0 0all onesall zeros 1all onesall zeros 0 or 1all onesnon-zeroNaN 14/02/201618http://numericalmethods.eng.usf.e du
19
19 IEEE-754 Format The largest number by magnitude The smallest number by magnitude Machine epsilon 14/02/201619http://numericalmethods.eng.usf.e du
20
Additional Resources For all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit http://numericalmethods.eng.usf.edu/topics/floatingpoint_re presentation.html 14/02/201620http://numericalmethods.eng.usf.e du
21
THE END http://numericalmethods.eng.usf.edu 14/02/201621http://numericalmethods.eng.usf.e du
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.