from struct import pack, unpack


def zfp_accuracy_opts(accuracy):
    """Create compression options for ZFP in fixed-accuracy mode

    The float accuracy parameter is the absolute error tolarance (e.g. 0.001).
    """
    zfp_mode_accuracy = 3
    accuracy = pack('<d', accuracy)  # Pack as IEEE 754 double
    high = unpack('<I', accuracy[0:4])[0]  # Unpack high bits as unsigned int
    low = unpack('<I', accuracy[4:8])[0]  # Unpack low bits as unsigned int
    return zfp_mode_accuracy, 0, high, low, 0, 0