bin2reals/2
Conversion between Binaries and Lists of Real (64-bit) Numbers
bin2reals(BINARY,RealsList) -(i,o),(o,i),(i,i)
Compatibility: Exclusively G.I.S. Prolog.
Remarks:
This predicate bin2reals converts lists of real (64-bit-) numbers to
"binaries", and vice versa, or else (i,i) it checks that a given binary
and a given list of real numbers can be converted to each other.
A binary in G.I.S. Prolog is a structure "bin(N,Bytes,NumberList)", where:
1) The first argument of a binary is always its number of elements.
2) The second argument of a binary is always either 8 or 4, to signify 64-bit
or 32-bit number representations.
3) The third argument of a binary is internally stored as a Visual Prolog
binary (an array of numbers), but when it is listed on the screen or in a
source-code file, it appears as a list of numbers.
A "binary" in G.I.S. Prolog is similar to a Visual Prolog Binary, which is
an array of bytes with a given length. However, in G.I.S. Prolog binaries
are used to store numbers of two types:
(a) 64-bit numbers, and (b) 32-bit numbers.
In the first case (a), a binary is: bin(NumOfElements,8,ListOfRealNumbers)
In the second case (b), a binary is: bin(NumOfElements,4,ListOfRealNumbers)