Example: confidence

Floating Point - Florida Institute of Technology

Floating Point NumbersFloating Point numbers are used approximate the real notation is the basis for the Floating Point instance, we can 100= 10 1= 10 2= 102and float the decimal Point by changing the value of the Floating Point NumbersA real numberx, written in scientific notation isnormalized ifit has a single non-zero digit to the left of the instance, 1023are , 10 1024are binary, 2 5is 2 5is 2 5can be normalized 2 a Number Written in scientific NotationWrite a numberxin normalized scientific notation asx= 10eYou must know The leading sign+or ofx.

Scientific notation is the basis for the floating point represen-tation. For instance, we can write 3.1415 100 = 31.415 10 1 = 314.15 10 2 = 0.031415 102 and float the decimal point by changing the value of the exponent. Normalized Floating Point Numbers A real number x, written in scientific notation is normalized if

Tags:

  Scientific, Notation, Scientific notation

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Floating Point - Florida Institute of Technology

1 Floating Point NumbersFloating Point numbers are used approximate the real notation is the basis for the Floating Point instance, we can 100= 10 1= 10 2= 102and float the decimal Point by changing the value of the Floating Point NumbersA real numberx, written in scientific notation isnormalized ifit has a single non-zero digit to the left of the instance, 1023are , 10 1024are binary, 2 5is 2 5is 2 5can be normalized 2 a Number Written in scientific NotationWrite a numberxin normalized scientific notation asx= 10eYou must know The leading sign+or ofx.

2 The normalizing digitd. The fractional partf. And the a Number Written in Binary scientific NotationNow, writexin normalizedbinary 2eYou still must know:The sign,the fractional partf,and becausexis normalized, the normalizing bit must Point NumbersThe numbers that can be written in Floating Point notation islimited by the size of their instance,There needs to be1bit to encode the there are8bits for the exponent, then there are28=256different there are23bits for the fractional part, then there are223different there are approximately2 28 223=232different32bit Floating Point say approximately because special numbers such as zeros, infinities,and NaNs (Not a Numbers)

3 S must be Standard for Floating - Point Arithmetic (IEEE 754)To minimize the early chaos in approximating real arithmetic astandard was invented in the 1980 s and today s Floating Point unitsimplement you will learn a pidgin version that explains some basic Floating Point Numbers (Pidgin Version)A normalized8-bit binary Floating Point numberxis parsed intothree parts as shown 1f 2f 3f 4 Thenxcan be written asx= ( 1)s 2e b2 The Floating Point SignLetxbe a normalized Floating Point (s e2e1e0f 1f 2f 3f 4)f pIn scientific notation ,x= ( 1)s ( 1f 2f 3f 4) 2e2e1e0 bIf the signs=0, thenxis (0e2e1e0f 1f 2f 3f 4)f p x 0If the signs=1, thenxis (1e2e1e0f 1f 2f 3f 4)f p x<0 The Floating Point ExponentThe exponent is3 must to represent positive and negative notation is used, because aligning exponents can be easilyimplemented in hardware with biased ,8numbers can be represented.

4 Let s choose 4to3using a biasb=4to shift the range0to7onto Floating Point Fractional PartWith4bits to represent the fractional part, you can represent15numbers:( )2=1716to( )2=3116in increments of1 Example of Pidgin Floating Point NotationLet s see how this the Floating Point numberx=(1 110 1101)f p= ( )2 2(110)2 4x= (1+1316) 26 4x= 2916 22= 2943An Example of Pidgin Floating Point NotationHere is another the Floating Point numberx=(0 010 0011)f p= +( )2 2(010)2 4x= +(1+316) 22 4x= +1916 2 2= +1964 The Distribution of Floating Point NumbersConsider how the Floating Point numbers are smallest positive numbers are(0 000 0001)f p=17/256to(0 000 1111)f p=31/256x0172562425631256 The next smallest range is from(0 001 0000)f p=16/128to(0 001 1111)

5 F p=31/1284 The Distribution of Floating Point NumbersLet s finish out the the Point ArithmeticThe rules of arithmetic fail for Floating Point instance, the associative law +(14+14)=8+12=172 But,(8+14)+14=8+14=8 Learning about Floating Point errors and how to guard againstthem or compensate for them is beyond the scope of this


Related search queries