PTR Masterworking Math - I need help

Sorry but I’m getting absolutely confused on some of these calculations. Does anyone know the true math behind them? I would love to apply a basic formula to estimate my results beforehand, but it seems to differ per affix or something.

I’m sitting here watching the screen say +5% or +25% but some of my stats show completely different values. For example;

I have a ring with 22,5 Greater Affix Attack speed base. Fully upgraded with 1 hit (Blue) gives me 33%. My gloves who also have a GA 22,5% Attack speed base with 2 hits (Yellow) is only around 36.8% fully upgraded. What kind of math is going here

Also for example, on 8/12 the ATS is 27%. Next upgrade 9/12 the ATS is 27.8%. This is not a 5% upgrade. And these discrepancies occur on numerous affixes.

Did you take in account, that theres a difference between additive percentages and multiplicative percentages? Also, do we know if these values are calculated before or after various other modifiers.
Diablo math is complicated, and the game doesn’t really do a great job giving us all the variables we need to make the calculations ourselves.

The greater affix bonus is additive with the 5% and 25% bonuses from the masterworking.
They all then multiply off of the max rolled stat.
The gloves are 120% increase on 15 attack speed instead of 70% increase on 22.5 attack speed.
Had hoped the second option was correct but no such luck.