beautypg.com

KROHNE MFC 010 C Converter User Manual

Page 96

background image


94

MFC010 Interface Manual

Therefore = -1

0

x 2

(144-127)

x [1 + { 4806344 / 2

23

}] = 1 x 2

17

x 1.5729609 = 206171.131

NB Accuracy up to the seventh digit i.e. 206171.1

Double Precision Floating Point Numbers (“Doubles”)

Double precision floating-point values are coded in a gr oup of 8 by tes (64 bits, as shown below). T his

enables the computer to represent values over a r ange of ±1.7 x 10

±308

, with an ac curacy of 15 dec imal

digits.

S E E E E E E E E E E E M M M M M M M M M M M M M M M M M M M M

Byte 7 (MSB)

Byte 6

Byte 5

Byte 4

M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M

Byte 3

Byte 2

Byte 1

Byte 0 (LSB)

To encode a value into a double precision floating point representation, use the following process.

Step 1 : If Value < 0 (i.e. negative) S = 1, otherwise S = 0

Step 2 : Set E = 1023

Step 3 : If Value < 2, skip to step 6

Step 4 : Divide the Value by 2, add 1 to E

Step 5 : Go back to step 3

Step 6 : If Value > 1, skip to step 9

Step 7 : Multiply the Value by 2, subtract 1 from E

Step 8 : Go back to step 6

Step 9 : M = ( Value – 1 ) * 2

52

To decode a double precision floating point representation use the following formula.

Floating Point Value = -1

S

x 2

(E-1023)

x [ 1 + { M / 2

52

} ]