FreeBSD/usr.bin/pom/pom.c
/*
 * potm --
 *	return phase of the moon
 */
potm
return phase of the moon
potm return phase of the moon
static double
potm(double days)
{
	double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime;
	double A4, lprime, V, ldprime, D, Nm;
	N = 360 * days / 365.2422;				
	adj360(&N);
	Msol = N + EPSILONg - RHOg;				
	adj360(&Msol);
	Ec = 360 / PI * ECCEN * sin(dtor(Msol));		
	LambdaSol = N + Ec + EPSILONg;				
	adj360(&LambdaSol);
	l = 13.1763966 * days + lzero;				
	adj360(&l);
	Mm = l - (0.1114041 * days) - Pzero;			
	adj360(&Mm);
	Nm = Nzero - (0.0529539 * days);			
	adj360(&Nm);
	Ev = 1.2739 * sin(dtor(2*(l - LambdaSol) - Mm));	
	Ac = 0.1858 * sin(dtor(Msol));				
	A3 = 0.37 * sin(dtor(Msol));
	Mmprime = Mm + Ev - Ac - A3;				
	Ec = 6.2886 * sin(dtor(Mmprime));			
	A4 = 0.214 * sin(dtor(2 * Mmprime));			
	lprime = l + Ev + Ec - Ac + A4;				
	V = 0.6583 * sin(dtor(2 * (lprime - LambdaSol)));	
	ldprime = lprime + V;					
	D = ldprime - LambdaSol;				
	return(50 * (1 - cos(dtor(D))));			
}
static double potm ( double days ) { double N , Msol , Ec , LambdaSol , l , Mm , Ev , Ac , A3 , Mmprime ; double A4 , lprime , V , ldprime , D , Nm ; N = 360 * days / 365.2422 ; adj360 ( & N ) ; Msol = N + EPSILONg - RHOg ; adj360 ( & Msol ) ; Ec = 360 / PI * ECCEN * sin ( dtor ( Msol ) ) ; LambdaSol = N + Ec + EPSILONg ; adj360 ( & LambdaSol ) ; l = 13.1763966 * days + lzero ; adj360 ( & l ) ; Mm = l - ( 0.1114041 * days ) - Pzero ; adj360 ( & Mm ) ; Nm = Nzero - ( 0.0529539 * days ) ; adj360 ( & Nm ) ; Ev = 1.2739 * sin ( dtor ( 2 * ( l - LambdaSol ) - Mm ) ) ; Ac = 0.1858 * sin ( dtor ( Msol ) ) ; A3 = 0.37 * sin ( dtor ( Msol ) ) ; Mmprime = Mm + Ev - Ac - A3 ; Ec = 6.2886 * sin ( dtor ( Mmprime ) ) ; A4 = 0.214 * sin ( dtor ( 2 * Mmprime ) ) ; lprime = l + Ev + Ec - Ac + A4 ; V = 0.6583 * sin ( dtor ( 2 * ( lprime - LambdaSol ) ) ) ; ldprime = lprime + V ; D = ldprime - LambdaSol ; return ( 50 * ( 1 - cos ( dtor ( D ) ) ) ) ; }
potm
      return phase of the moon
potm return phase of the moon
/* sec 42 #3 */ /* sec 42 #4 */ /* sec 42 #5 */ /* sec 42 #6 */ /* sec 61 #4 */ /* sec 61 #5 */ /* sec 61 #6 */ /* sec 61 #7 */ /* sec 61 #8 */ /* sec 61 #9 */ /* sec 61 #10 */ /* sec 61 #11 */ /* sec 61 #12 */ /* sec 61 #13 */ /* sec 61 #14 */ /* sec 63 #2 */ /* sec 63 #3 */