BinaryFormat.Double

Binary

A binary format that reads an 8-byte IEEE double-precision floating point value.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

BinaryFormat.Double(binary as binary) as any

Parameters

NameTypeRequiredDescription
binarybinaryYesThe binary data to read the 8-byte double-precision floating point value from.

Return Value

functionA 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

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks