Javascript for Surya Siddhanta Solar Eclipse Calculation
Our web spider found the following code snippet at users_hartwick_edu and contains information about atan and JavaScript.
atan(bas/Math.sqrt(1-bas*bas))/dr; 
if (L>360) {L=L-360}; 
if (L<0) {L=L+360}; 
if (k==1) {this.tlongone=L}; 
if (k==2) {this.tlongtwo=L}; 
this.manom=M; 
//this functions takes in the year, month and day 
//and calculates the Julian Day 
function julian(form) { 
var yr=parseFloat(form.yrbox.value); 
var mo=parseFloat(form.mobox.value); 
var dy=parseFloat(form.dybox.value); 
var jy= yr + mo/12; 
var bb=1; 
if (jy < 1582) {bb=0;} 
else {bb=1;} 
var bg=0; 
if (yr<0){bg=1} 
if (mo<=2){mo=mo+12;yr=yr-1;} 
var a =inty(yr/100); 
var b = (2 - a + inty(a/4))*bb; 
jd=inty(365.25*yr-bg*0.75) 
+inty(30.601*(mo+1))+dy+1720994.5+b; 
form.julbox.value=jd; 
} 
//this function gets the integer value of x 

function
Read the entire article....