Exponential sums are a specialized area of math that studies series with terms that are complex exponentials. Estimating such sums is delicate work. General
When webpack bundles your javascript it wraps all of your individual files/modules in functions so they are no longer run in the global scope, therefore if you want to make a variable global you have to explicitly set it on the window object, i.e.
window.a = 1;