This macro is not the answer, all it will do is home the axis when you insert it into the code.
Would it not be better to correct the fault, if its a rounding error in the step count, which it looks as if it is then driving the A axis at 1.8:1 ratio will remove the error and the step count will be perfect and the guess where to put the macro in the code is eliminated.
Just my opinion.
Graham