> This is a bug in groff's MM. Irrespective of the type of display, the > Equation number argument to .EQ should display on the right margin.
You are right, it is a bug in groff's MM. Your fix does look reasonable. The real problem is that groff's MM's treatment of displayed equations is messed up, and should be completely reworked. In groff's MM the equation number is printed independently of the equation proper, and is thus not guaranteed to be aligned with the baseline of the equation. AT&T MM does it correctly.