in reply to Re^4: Passing undef to XSUB
in thread Passing undef to XSUB

it gives incorrect results for arguments equal to zero

Yes ... I had missed the important point that 0 ought to be evaluated as 0 (and not -1).

Now I understand what your speculative code was driving at.

Cheers,
Rob