1 / 21

Floating Point Representation

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.

Télécharger la présentation

Floating Point Representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 http://numericalmethods.eng.usf.edu

  2. Floating Point Representationhttp://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu

  3. Floating Decimal Point : Scientific Form http://numericalmethods.eng.usf.edu

  4. Example The form is or Example: For http://numericalmethods.eng.usf.edu

  5. Floating Point Format for Binary Numbers 1 is not stored as it is always given to be 1. http://numericalmethods.eng.usf.edu

  6. 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 mantissa exponent Sign of the number Sign of the exponent http://numericalmethods.eng.usf.edu

  7. Machine Epsilon Defined as the measure of accuracy and found by difference between 1 and the next number that can be represented http://numericalmethods.eng.usf.edu

  8. Example Ten bit word • Sign of number • Sign of exponent • Next four bits for exponent • Next four bits for mantissa Next number http://numericalmethods.eng.usf.edu

  9. 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) Sign of the number exponent mantissa Sign of the exponent http://numericalmethods.eng.usf.edu

  10. IEEE 754 Standards for Single Precision Representationhttp://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu

  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. http://numericalmethods.eng.usf.edu

  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 http://numericalmethods.eng.usf.edu

  13. IEEE-754 Format Single Precision 32 bits for single precision Biased Exponent (e’) Sign (s) Mantissa (m) http://numericalmethods.eng.usf.edu 13

  14. Example#1 Biased Exponent (e’) Sign (s) Mantissa (m) http://numericalmethods.eng.usf.edu 14

  15. Example#2 Represent -5.5834x1010 as a single precision floating point number. Biased Exponent (e’) Sign (s) Mantissa (m) http://numericalmethods.eng.usf.edu 15

  16. Exponent for 32 Bit IEEE-754 8 bits would represent Bias is 127; so subtract 127 from representation http://numericalmethods.eng.usf.edu 16

  17. Exponent for Special Cases Actual range of and are reserved for special numbers Actual range of http://numericalmethods.eng.usf.edu

  18. Special Exponents and Numbers all zeros all ones http://numericalmethods.eng.usf.edu

  19. IEEE-754 Format The smallest number by magnitude Machine epsilon The largest number by magnitude http://numericalmethods.eng.usf.edu 19

  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_representation.html http://numericalmethods.eng.usf.edu

  21. THE END http://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu

More Related