added mylog() and devectorized max(abs) in computeTuned2() function.