Rob
Ansys Employee

As a guess (I'm not allowed to comment on macros that aren't in the UDF manual) the macros will return the cell if the point is in it, the Closest macro will do some checks incase you've missed the meshed domain. 

In C coding "double" calls double precision, ie more significant figures are stored. If a mesh is very fine or the cells small a distance might return zero without the extra accuracy.