$$ i_t=\sigma(W_{ii}x_t+b_{ii}+W_{hi}h_{t-1}+b_{hi}) \ f_t=\sigma(W_{if}x_t+b_{if}+W_{hf}h_{t-1}+b_{hf}) \ g_t=tanh(W_{ig}x_t+b_{ig}+W_{hg}h_{t-1}+b_{hg}) \ o_t=\sigma(W_{io}x_t+b_{io}+W_{ho}h_{t-1}+b_{fo}) \ c_t=f_t\odot c_{t_1}+i_t\odot g_t \ h_t=o_t\odot tanh(c_t) $$