English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

AMOS supports a 48-bit floating point format consisting of a 40-bit mantissa, 8-bit exponent, and a signbit.
Because a normalized mantissa always starts with a binary one in the high-order bit, this bit is not
stored in the floating point number but is always assumed to be present. This allows us to represent the
40-bit mantissa in only 39 bits.

2006-08-03 01:59:20 · 3 answers · asked by skett1978 1 in Computers & Internet Programming & Design

http://www.alphamicroproducts.com/dsm00/04010A00.pdf

chapter 11 for more details on how the floating point number is stored.

2006-08-03 02:02:07 · update #1

3 answers

Try this:

$number = unpack('f', $six_byte_string);

For more information, see:

http://www.php.net/unpack

2006-08-09 06:13:38 · answer #1 · answered by NC 7 · 0 0

You probably need to convert it to an IEEE 64-bit floating point (double) by bit-shifting. I don't know how you do this in PHP - if you discover it isn't possible you can write an external program (e.g. in C) to do the conversion for you.

Populate a stream with the bits of the 6-byte string, inserting the required bits to pad it to a 64-bit float. Then read in the stream to a double as if you were reading it from a new file.

2006-08-03 04:03:11 · answer #2 · answered by Anonymous · 0 0

sorry

2006-08-06 21:25:05 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers