**Program Code**

The program is written in JavaScript.

**Source**

The program uses the relationship between inverse F-distribution, inverse beta function and binomial (from Rollin Brant) to get the "exact" binomial confidence interval. For large samples, a normal approximation is calculated using the Wilson Score confidence interval method.