BinaryFormat.Double
BinaryA binary format that reads an 8-byte IEEE double-precision floating point value.
Syntax
BinaryFormat.Double(binary as binary) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
binary | binary | Yes | The binary data to read the 8-byte double-precision floating point value from. |
Return Value
function — A binary format function that reads an 8-byte IEEE 754 double-precision floating point value from binary data.
Remarks
BinaryFormat.Double is a binary format specifier that reads an 8-byte (64-bit) IEEE 754 double-precision floating point value from binary data. This is the standard representation for floating point numbers in most binary file formats and network protocols.
A double-precision value provides approximately 15-17 significant decimal digits of precision and can represent values in the range of approximately +/-5.0 x 10^-324 to +/-1.7 x 10^308.
The byte order defaults to little-endian. Use BinaryFormat.ByteOrder to change the byte order if the source data uses big-endian encoding.
Examples
Example 1: Read a double-precision floating point value
let
// IEEE 754 double-precision representation of 1.0 (little-endian)
binaryData = #binary({
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF0, 0x3F
}),
result = BinaryFormat.Double(binaryData)
in
result