In the implementation of gdal_merge:
https://svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_merge.py
a value of 0.1 is added to the conversion from geo-referenced coordinates to pixel indexes:
tw_xoff = int((tgw_ulx - t_geotransform[0]) / t_geotransform[1] + 0.1)
tw_yoff = int((tgw_uly - t_geotransform[3]) / t_geotransform[5] + 0.1)
What is the reason for adding 0.1?