Generally with very advanced fire control computers. Even the old battleships had analog computers that were filled with gears and wheels that computed the gun position. These take into account the characteristics of the barrel.
View attachment 8682642
Modern guns (like the Abrams) have computers that take temperature, barrel droop, number of rounds fired, humidity.... all kinds of factors into the shot. If you look, you can see a laser on the barrel that is part of the system.
None of that really applies to small arms (yet).
The part of the 'calculation' that folks are discussing here is "internal ballistics." What happens from the time the primer is struck until the bullet leaves the muzzle. After that it is "external ballistics." The instant it hits a target, it is "Terminal Ballistics."
The structured barrel addresses internal ballistics.
Thanks for the tag,
@Makinchips208 ... I'll look at that book. No, not familiar with it.
Cheers,
Sirhr