Try the IEEE 754 Converter http://www.h-schmidt.net/FloatConverter/IEEE754.html. Read the note:
Rounding errors: Not every decimal number can be expressed exactly as
a floating point number. This can be seen when entering "0.1" and
examining its binary representation which is either slightly smaller
or larger, depending on the last bit.
You can convert decimal presentation of 101.7 into binary presentation 01000010110010110110011001100110
but it is a little bit less than 101.7. Turn the last binary digit into 1 and you get 01000010110010110110011001100111
but now it is a little bit more than 101.7. In the 32-bit binary world there is nothing between those two values. You must just tolerate it or to use the method suggested by Mikkel Lydholm Rasmussen and multiply by ten and use integer data type.
EDIT:
@mkennedy correctly pointed out that the observed error was far too big compared with the rounding error calculated with IEEE754 converter:
Observed: 101.70001220703125
IEE754: 101.70000457763672
Thus the observed value added 0.0122 millimeters to the DEM height value while the rounding error from 32 bit adds only 0.0046 millimeters. This is theoretically interesting while perhaps the unexplained error of 0.0076 mm is not meaningful for most practical work.
I did some more debugging and I wrote this test XYZ file "float_error.xyz":
ncols 1
nrows 2
xllcorner 680000
yllcorner 5420000
cellsize 5.0
NODATA_value -9999
101.7
101.3
Gdalinfo from this file is:
gdalinfo float_error.xyz -stats
Driver: AAIGrid/Arc/Info ASCII Grid
Files: float_error.xyz
Size is 1, 2
Coordinate System is `'
Origin = (680000.000000000000000,5420010.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Corner Coordinates:
Upper Left ( 680000.000, 5420010.000)
Lower Left ( 680000.000, 5420000.000)
Upper Right ( 680005.000, 5420010.000)
Lower Right ( 680005.000, 5420000.000)
Center ( 680002.500, 5420005.000)
Band 1 Block=1x1 Type=Float32, ColorInterp=Undefined
Minimum=101.300, Maximum=101.700, Mean=101.500, StdDev=0.200
NoData Value=-9999
Metadata:
STATISTICS_MAXIMUM=101.69999694824
STATISTICS_MEAN=101.5
STATISTICS_MINIMUM=101.30000305176
STATISTICS_STDDEV=0.19999694824219
Next I converted XYZ into GeoTIFF as:
gdal_translate -of GTiff -ot Float32 float_error.xyz float_error.tif
Input file size is 1, 2
0...10...20...30...40...50...60...70...80...90...100 - done.
Finally new gdalinfo for finding out the conversion error:
gdalinfo float_error.tif
Driver: GTiff/GeoTIFF
Files: float_error.tif
Size is 1, 2
Coordinate System is `'
Origin = (680000.000000000000000,5420010.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 680000.000, 5420010.000)
Lower Left ( 680000.000, 5420000.000)
Upper Right ( 680005.000, 5420010.000)
Lower Right ( 680005.000, 5420000.000)
Center ( 680002.500, 5420005.000)
Band 1 Block=1x2 Type=Float32, ColorInterp=Gray
Min=101.300 Max=101.700
Minimum=101.300, Maximum=101.700, Mean=101.500, StdDev=0.200
NoData Value=-9999
Metadata:
STATISTICS_MAXIMUM=101.69999694824
STATISTICS_MEAN=101.5
STATISTICS_MINIMUM=101.30000305176
STATISTICS_STDDEV=0.19999694824219
My GDAL 2.0 seems to produce slightly different result, and it is an exact match with the result that the IEEE754 converter gives for binary value 01000010110010110110011001100110
Conclusion 1: GDAL 2.0 seems to make the conversion from ASCII Grid decimal values into 32 floating points as accurately as possible.
Conclusion 2: The Vincent's value 101.70001220703125 is still unexplained. The GDAL version may be different. I suppose that Click with QGIS method is accurate and does not involve any interpolation.