My character has 135 AP (AGL 10 + Kamikaze trait + Action Girl perk rank 2).
Ranger Sequoia AP cost is 30. With Math Wrath perk this cost is reduced to 27. So in VATS I should be able to perform 135 / 27 = 5 shots (full ammo clip). Well, I can only perform 4 shots, VATS reports "Low AP" for the fifth.
Now for Gobi. AP cost is 24. With Math Wrath this cost is reduced to 22 (I'm rounding down the cost reduction from 2.4 to 2). So in VATS I should be able to perform 6 shots (again the full ammo clip), with 3 AP left (6 x 22 = 132). But VATS only allows for 5 shots, reporting "Low AP" for the sixth, even when AP meter is clearly showing that a certain amount of AP would remain after the sixth shot.
Without Math Wrath perk, VATS AP meter for Gobi shows that the sixth shot would consume all remaining AP points (and more, 6 x 24 = 144), so the Math Wrath perk is indeed aplying AP cost reduction to each shot, yet VATS is not allowing for the expected total number of shots in the end.
Both weapon examples have something in common: ammo clip is depleted with the last shot. So let's consider La Longue Carbine with a clip capacity of 11 (AP cost is 24, same as Gobi). This time VATS allows to perform 6 shots with Math Wrath perk, as expected.
We have a problem here: for the last bullet in a clip, VATS is adding reload time to the shot AP cost, hence not allowing total expected shots for Ranger Sequoia neither Gobi. While this can be intended, it doesn't make sense.
VATS should not add reload time AP cost to last bullet in a clip bacause player is not requesting a shot beyond clip capacity. Everybody will agree: you can shoot the last bullet in a clip before you have to reload. VATS should add weapon reload cost when shot requires reloading to be performed, not the case in the first two examples above.