# Preview for editing tables

In this editor you can enter or edit tables in YAML format, and you can get a preview of how numberdb would render it. You cannot save changes here. Once everything looks good, upload it to the git repository numberdb-data.
— preview —
Area of the regular n-gon
edit on github
Numbers
constraint
$n$
$A_n$
INPUT{numbers.yaml} (not shown in preview)
Definition
This table lists the areas $A_n$ of the regular $n$-gon [1] given that either the side length $s$ equals $1$, the outer radius $R$ equals $1$, or the inner radius (apothem) $r$ equals $1$.
Parameters
constraint
—   length that is constrained to be $1$
$n$
—   integer ($n \geq 3$)
Formulas
(1)
$A_n = \frac{n}{4} \cot \frac{\pi}{n}$ if $s=1$.
(2)
$A_n = \frac{n}{2} \sin \frac{2\pi}{n}$ if $R=1$.
(3)
$A_n = n \tan \frac{\pi}{n}$ if $r=1$.
(4)
All numbers in this table are algebraic numbers.
Programs
(P1)
Sage
numbers = {
'unit-s': {n: n/4 * cot(pi/n)   for n in [3..10]},
'unit-R': {n: n/2 * sin(2*pi/n) for n in [3..10]},
'unit-r': {n: n   * tan(pi/n)   for n in [3..10]},
}