Replace table based tanh usage with direct tanh usage