Drake

by Sam Fereday

HTML

<div id="output"></div>

JavaScript

function doTheDrake(r, fp, ne, fl, fi, fc, l) {
	return r * fp * ne * fl * fi * fc * l;
}

/*
- average star formation per year in our galaxy
- fraction of stars with planets
- average number of planets that may support life
- fraction of planets that 'go on' to support life
- fraction that can support intelligent life
- fraction of civilizations that develop tech detectable in space
- length of time such civilizations release detectable signs
*/
// http://www.astrodigital.org/astronomy/drake_equation.html
document.getElementById("output").innerHTML = doTheDrake(
	2,
  0.45,
  0.50,
  0.20,
  0.05,
  0.5,
  500
);