 <p>See the documentation of Math.log : <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log</a></p> <p>For further help you should ask your math teacher or someone who knows about algorithms ;-P</p> <p>maybe you should see the part: <code>((b*c-a*d)/(c*c)*(Math.log(Math.abs(c*Xp+d))))</code> Maye you want to have the braces done like <code>(x/(z*y))</code> or <code>((x*y)/z)</code>.</p>