In triangle $ABC$,
\[2a^2 + 4b^2 + c^2 = 4ab + 2ac.\]Compute the numerical value of $\cos B.$
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
In triangle $ABC$,
\[2a^2 + 4b^2 + c^2 = 4ab + 2ac.\]Compute the numerical value of $\cos B.$
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
\frac{7}{8}
In triangle $ABC$,
\[2a^2 + 4b^2 + c^2 = 4ab + 2ac.\]Compute the numerical value of $\cos B.$
train