Mapping normals from -1..1 to 0..1
Note: This is only a partial answer, since more information were provided in the comments after it was written. Color management is nonetheless relevant for a correct output.



The reason your correct value of $0.5$ is saved as $0.735357$ is because you're using the Standard view transform and your Display Device is set to sRGB.

The scene linear values are transformed into the sRGB color space (IEC 61966-2-1:1999). During this process gamma correction is applied.

$$\gamma_{sRGB}(x) = \begin{cases} 12.92x,&amp; x \le 0.0031308\\
    1.055 x^{\left(\frac{1}{2.4}\right)} -0.055 ,              &amp; \text{otherwise} \end{cases}$$

For an input of $x=0.5$ this results in $1.055 \times 0.5^{\left(\frac{1}{2.4}\right)}-0.055=0.735357$

In order to save the scene linear values use the OpenEXR (.exr) format. Blender will not apply any view transforms or display transforms when using this format. Alternatively, if you're certain that your output is in the $[0.0, 1.0]$ range, you can also set the view transform to Raw and use any other image format to save an approximation of the values. Blender will map the values to the $[0,255]$ range automatically.