From the in-game codex, the formula for DPS
((Power + Base Weapon Damage * (1 + Weapon Damage %) * (1 + Weapon Item Quality) + Weapon Damage+) * (1 + Elemental Damage Percent) + Elemental Damage+) * Attacks Per Second. And as Golem pointed out above, +2 multiattack would give you two additional bullets that deal 50% damage each. In the below calculations, I will shorten base weapon damage to BWD, weapon damage % to WD%, weapon damage+ to WD+, elemental damage percent to ED%, elemental damage+ to ED+, and attacks per second to APS.
So let’s say you have a weapon that deals 1000 base damage, the weapon does 2 attacks per second, and you don’t have any other modifiers. Then your weapon’s DPS would be BWD * APS = 1000 * 2 = 2000 DPS.
Now let’s suppose the same setup as before, but you have an additional 2 multiattack affix. Your new damage is BWD * APS + Multiattacks * BWD * (Multiattack Modifier) * APS = (1000 * 2) + (2 * 1000 * 0.5 * 2) = 2000 + 2000 = 4000 DPS.
If instead of multiattack, you had 100% shock damage, then your DPS remains the same: DPS = BWD * (1 + ED%) * APS = 1000 * (1 + 1.00) * 2 = 1000 * 2 * 2 = 4000.
It gets more complicated if we throw weapon damage+ into the mix as now things depend on when the 50% nerf to the multiattacks’ damage occurs. Let’s suppose now that our weapon does 1000 base damage, and we have another affix adding 5000 Weapon Damage+. It still fires two attacks per second. Without any other affixes, our DPS is (BWD + WD+) * APS = (1000 + 5000) * 2 = 6000 * 2 = 12,000.
If we add in a 2 multiattack affix, then it kind of matters where the 50% damage nerf on the multiattacks are applied. (I don’t know this offhand–maybe someone else knows?) If it is applied directly to the base weapon damage, then our DPS becomes (BWD + WD+) * APS + Multiattacks * (BWD * (Multiattack Modifier) + WD+) * APS = (1000 + 5000) * 2 + 2 * (1000 * 0.50 + 5000) * 2 = 12000 + 2 * (500 + 5000) * 2 = 12000 + 22000 = 34,000. If on the other hand, the 50% damage is applied at the end, then the new DPS becomes (BWD + WD+) * APS + Multiattacks * (Multiattack Modifier) * (BWD + WD+) * APS = (1000 + 5000) * 2 + 2 * 0.5 * (1000 + 5000) * 2 = 12000 + 6000 * 2 = 24,000.
Now if instead of multiattack, we just had 100% shock damage, then our DPS becomes (BWD + WD+) * (1 + ED%) * APS = (1000 + 5000) * (1 + 1.00) * 2 = 6000 * 4 = 24,000, so we can see in this case that shock damage % is inferior from a pure damage perspective regardless of when the 50% damage of multiattacks is applied.
Things also get interesting if we have elemental damage+ instead of weapon damage+ since this gets applied after elemental damage%. Let’s say we have 1000 base weapon damage, 2 attacks per second, and 5000 shock damage+. The numbers for multiattack don’t change, but things do change for elemental damage % because the 5k is not included in the damage multiplied by shock damage %. Thus, with 100% shock damage %, our DPS is (BWD * (1 + ED%) + ED+) * APS = (1000 * (1 + 1.00) + 5000) * 2 = 7000 * 2 = 14,000 which is much worse than having 2 multiattack (which we calculated earlier to have a DPS of 24,000 or more).
So to conclude, I’d probably stick with the multiattack affix.