function getBaseLog(x, y) { return Math.log(y) / Math.log(x); } function wl() { num1 = document.getElementById("p").value; num2 = document.getElementById("q").value; document.getElementById("result").innerHTML = -5*(console.log(getBaseLog(100, num1/num2))); } Visual/ Apparent Magnitude
Mobirise

Enter Fx 'the observed flux density using spectral filter x':
Enter f 'frequency' : Hz

The Visual/Apparent magnitude is : μW

Designed with Mobirise site themes