I developed this separately for my Z9V5 but I’m pretty sure you can just pull the rotation distance from each extruder.
also, your math has a few issues with it. I found that multiplication over-extruded, division is need, but you need to add a very small number to the value to prevent division by zero errors
[gcode_macro MIX]
gcode:
{% set A = params.A|default(0.25)|float %}
{% set B = params.B|default(0.25)|float %}
{% set C = params.C|default(0.25)|float %}
{% set D = params.D|default(0.25)|float %}
{% set rot = 7.71 %}
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_1 MOTION_QUEUE=extruder
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_2 MOTION_QUEUE=extruder
SYNC_EXTRUDER_MOTION EXTRUDER=extruder_3 MOTION_QUEUE=extruder
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder DISTANCE={rot/(A+0.0001)}
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder_1 DISTANCE={rot/(B+0.0001)}
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder_2 DISTANCE={rot/(C+0.0001)}
SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder_3 DISTANCE={rot/(D+0.0001)}
this is what I wrote but I still need to calibrate my bmgs on that printer and install an ssr for the new bed. rot
was set of all 4 for they’re all very different it seems