I wonder whether one could not just the existing math package language for lua and just use those notations in the effect, then the code just takes it as it is as formula and calculates it :) Basically just adding the capability of using formulas in the effects as in the code. Hence, may be easier than anticipated at the end, I try to add those things whenever I have more time :)
(and when extending the math package in lua one could use integrals and so on, lol :D)

