var a = document.forms[0].elements[0].value;
var b = document.forms[0].elements[1].value;
var c = document.forms[0].elements[2].value;
var d = document.forms[0].elements[3].value;
var Xp = document.forms[0].elements[4].value;
var Yp = document.forms[0].elements[5].value;
document.forms[0].elements[7].value = a/c;
document.forms[0].elements[8].value = (b*c-a*d)/(c*c);
document.forms[0].elements[9].value = c;
document.forms[0].elements[10].value = d;
document.forms[0].elements[11].value = Yp-(a/c*Xp)-((b*c-a*d)/(c*c)*(Math.log(Math.abs(c*Xp+d))));`
element 11 should be -1 but instead i get 6.20. I understood that the error is from Math.log to ; is Math.log the natural logarithm? cause i have to do that