first script - works for some time, than stops ???

    Nov 22 2012 | 2:28 am
    and if I don't touch it, after a while it'll work again!
    but it always freeze eventually... so strange behaviour! any idea about the possible reasons?
    Thank you, Marco
    PS: the goal is to draw a simple math expression: i thought in this case JS would have been more efficient than max, but I read so many people saying that Math.pow() is highly inefficient, so I may reconsider using it.
    I attach the patch (showing the max equivalent too) and the js file. cheers :)