I followed this suggestion to join points to nearest lines in QGIS. While most points get attached there are instances of points, often in close proximity to a line, that do not get connected (see figure).
Is this a numerical rounding issue?
I think that this is not a numerical rounding issue, but it could be a problem with your point vector layer. I tried out Detlev script; as you can see at the next image (where point into green circle is only 8 mm from the line).
Details can be observed at the next image where I used the Zoom In tool. Segment was effectively produced with only 8 mm of separation (corroborated with Measure Line tool).
QgsPoint objects store coordinates as double precision values. Following several documents on Python and data types this allows for a precision of 17 significant digits (eg http://floating-point-gui.de/formats/fp/). I tested the (my) script with a series of points with decreasing distances from a line.
If you print out the distance, and the nearest point coordinate:
print min([l.geometry().closestSegmentWithContext( QgsPoint(p.geometry().asPoint())) for l in l_lyr.getFeatures()])
you see, that if the point and the nearest point on the line are equal up to the 17th digit, the length is reported as 0.0, and the nearest point on the line is considered to be equal to the point being evaluated.