Smithing formula for non-jewelry stuff is (sqrt(STR*smithing)) but that should be only softcap (or hardcap? )
If I take your results I get close to the numbers as you present it:
-2x Wrought Iron Q39 + 1x Block q10= Soldier's Sword Q37
2x 39 + 10 + 48 + 46 = 182/ 5 = 36,4 ( I assume some of your mats can have non-integer values, or maybe it is rounded-up (but I guess rounding should be rather down)
6x Wrought Iron q30-34=Plate Armor Q37
6*32 + 48 + 46 = 35,75 (if you count 34 all wroughts it is: 37,25)
2x Wrought Iron q34 + 1x Leather Q30
2*34 + 30 + 48 + 46 = 192 / 5 = 38,4
All the numbers are really close to your outcoming quality. The small differs are caused, I think, due to the anvil q not perfectly 48 ( you might have do the anvil before you reached smithing 48 and maybe some decimal values for q of mats are counted, but not displayed, but I am not confident with this)
"That is not dead which can eternal lie / And with strange aeons even death may die."
H.P. Lovecraft