How to get accurate Z depth?
If you want depth values that are parallel to the image plane, change the camera to orthographic projection. This will give accurate values in the Z-pass.



Edit:

Your error was having the file output node set to Float (Half) instead of Float (Full). Each file output node as its own settings! The reduced bit width resulted in the loss of precision.

Here is a little script for checking the values and displaying the normalized image. It requires OpenCV.

import cv2
import argparse

def image_values(path):
    """
    Print the pixel values of the column at the image center and display the normalized image.
    :param path: Path to image
    """
    print(path)
    img = cv2.imread(path, cv2.IMREAD_ANYDEPTH)
    (h, w) = img.shape
    print("image ({}, {})".format(h, w))
    img2 = cv2.normalize(img, None, 0., 1., cv2.NORM_MINMAX)
    for y in range(h):
            print("({},{}): {}".format(int(w/2), y, img[y, int(w/2)]))
    cv2.imshow('image', img2)
    cv2.waitKey(0)
    cv2.destroyAllWindows()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Analyze image values")
    parser.add_argument("--src", type=str, help="Image to load.", required=True)
    args = parser.parse_args()
    image_values(args.src)