Light Function Normal - aliasing

So I’m using a Light function (Image below) to constrain the light to only show on Z axis surfaces (The Floor).

Its working, however there is a weird artefact along some edges, seems to be from the Cross product node.

Any ideas on how I can fix this ?