No, I'm saying that that formula depends on how you calculate those coordinates. So my formula basically uses all those lengths without signs and attaches signs according to whether the image is imaginary or real. That's the standard thing I've found in optics books. Your formula probably just uses a different convention, but I can't compare since I have no access to your literature.
That's why I gave you the principle, so you can understand if there's a difference in conventions.
Edit: Also there can be a confusion arising from whether ##i## and ##p## are heights of image and object, or their distances from the pole of the mirror. By similarity of triangles those quotients should be the same, but the sign convention can play a role there depending on how you calculate heights etc. In my definition I used horizontal distances, not heights.
For example, if you say that non inverted height of an object/image is positive, and inverted one is negative, then in this case, where you have inverted image, magnification would have that extra minus sign(in general it is defined as ratio of absolute heights of image vs object). So you need to take into account how you defined those lengths you measure in optics, that's the only issue here.