Uses Lua's string library to calculate formulas.