Why is my shader giving me ... such strange results? (Blender 2.78a)

for context it’s supposed to be giving me a point in 3d space, and should be dropping in distance as it gets further from that point, .i.e. it should be calculating the distance between two points and returning 1 point but somehow it’s giving me not one but at least 2, and drooping off for some reason, it’s really really strange. is my distance formula wrong? why is this happening? and how do i fix it?

(the reason i’m doing this is so that i can do math against a point on the same duplicated object over and over again without the need for a true external point like a lamp)

here is the unusual result:

DroopingBug.blend (520.9 KB)

the distance formula i used if you don’t feel like downloading.