Repository navigation
Expand file tree
/
Copy pathnotation.html
More file actions
284 lines (275 loc) · 45.6 KB
/
Copy pathnotation.html
File metadata and controls
284 lines (275 loc) · 45.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>Only a name</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Serif+Display&display=swap">
<!--
notation.html: where π and e are only a name (14 November 2026, SPN R997; Tom: "Save these results in an essay.
Create a demo that explains."; essay 24). A standalone page like shv.html, plain script, no canvas libraries.
1. One law, two ways: a turn written in the angle (cos, sin, tan of θ, so π) and the same turn written in its
half-slope s = p/q, in exact fractions (BigInt); n turns compose exactly; the float way is off by about 10⁻¹⁶.
2. Where π is content: Leibniz's and Wallis's partial sums, exact fractions every one, none of them π.
3. All 189 laws: NTN's 82 (the laws of Reads and Writes that carry π or e) and NTX's 107 (standard formulas), each
a tile, teal where its checker found π or e to be notation, violet where it is content; grouped by list, by the
blind direction/amount tag (DVA) and by the blind chart/limit/neither class (PIE, NTX). Tap a tile for the law,
its restatement or the reason none was found.
4. The cross-table: notation share in each cell, the post hoc reading (every limit content; laws among directions
without a limit about three in five on both lists) and what the mix does and does not explain.
The laws' data are runs/dva/laws.json (python3 runs/dva/export.py), embedded below; the verdicts are the checkers'.
Links: ?s=p/q&n=&group=list|tag|cls|cross&law=NTN-11. Test hook: window.__notation.
-->
<style>
:root { color-scheme: dark; --ground: #0c0c11; --panel: #14141b; --line: rgba(255,255,255,0.09); --ink: #c8c8d0;
--dim: #8a8a96; --bright: #e6e4ee; --gold: #d4a052; --teal: #8ce6cd; --red: #d96e5b; --violet: #b59cf0 }
* { box-sizing: border-box }
body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.5 'DM Mono', ui-monospace, monospace }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px }
h1 { font: 400 32px/1.1 'DM Serif Display', Georgia, serif; color: var(--bright); margin: 0 0 6px }
h2 { font: 400 20px/1.2 'DM Serif Display', Georgia, serif; color: var(--bright); margin: 0 0 4px }
.lede { color: var(--dim); margin: 0 0 14px; max-width: 72ch }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 14px }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 }
button { max-width: 100%; font: inherit; color: var(--bright); background: #1d1d27; border: 1px solid var(--line);
border-radius: 6px; padding: 5px 10px; cursor: pointer; touch-action: manipulation }
button.on { border-color: var(--gold); color: var(--gold) }
input[type=range] { flex: 1 1 220px; min-width: 0; accent-color: var(--gold) }
label { color: var(--dim) }
.out { white-space: pre-wrap; color: var(--bright); font-size: 12.5px; margin-top: 6px; overflow-wrap: anywhere }
.cap { color: var(--dim); font-size: 12.5px; margin: 0 0 6px; max-width: 80ch }
.note { color: var(--dim); font-size: 12.5px }
a { color: var(--teal) }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
@media (max-width: 640px) { .two { grid-template-columns: 1fr } }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-width: 0 }
.box h3 { margin: 0 0 4px; font: 500 13px/1.3 'DM Mono', monospace; color: var(--gold) }
.groups { display: grid; gap: 10px }
.grp { border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-width: 0 }
.grp .hd { display: flex; justify-content: space-between; gap: 8px; color: var(--bright); font-size: 12.5px; margin-bottom: 6px; flex-wrap: wrap }
.grp .hd span:last-child { color: var(--dim) }
.tiles { display: flex; flex-wrap: wrap; gap: 3px }
.tile { width: 16px; height: 16px; border-radius: 3px; border: 0; padding: 0; cursor: pointer; background: #3a3350 }
.tile.yes { background: var(--teal) }
.tile.sel { outline: 2px solid var(--gold); outline-offset: 1px }
.bar { height: 6px; border-radius: 3px; background: #3a3350; overflow: hidden; margin-top: 6px }
.bar i { display: block; height: 100%; background: var(--teal) }
table { border-collapse: collapse; width: 100%; font-size: 12.5px }
th, td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top }
th { color: var(--dim); font-weight: 400 }
td.num { color: var(--bright); white-space: nowrap }
.wrap { overflow-x: auto }
.key { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; margin-right: 4px }
</style>
</head>
<body>
<main>
<h1>Only a name</h1>
<p class="lede">Many laws carry π or e. In some of them it does work no other number could; in others it only names a
share or a slope, and the same relation can be written exactly with fractions and square roots and no π or e at all.
This page shows the difference on one law, then sorts all 189 laws two lists hold: the 82 of <i>Reads and Writes</i>
that carry π or e, and 107 standard formulas listed by a fresh agent.</p>
<div class="panel">
<h2>1. One turn, written two ways</h2>
<p class="cap">A direction of slope s. Classically one takes its angle θ (so θ = arctan s, and π comes with the
angle) and writes the turn by twice that angle with cos and sin. Written in the half-slope s itself, the same turn
is a pair of fractions. Pick s; the left side is the float way, the right the exact one. n turns compose by
multiplying fractions, and the exact side never needs an angle.</p>
<div class="row"><label for="sp">s =</label><select id="sp"></select>
<label for="nn">turns n</label><input id="nn" type="range" min="1" max="12" step="1" value="3"><span id="nv"></span></div>
<div class="two">
<div class="box"><h3>in the angle (uses π)</h3><div class="out" id="o1a"></div></div>
<div class="box"><h3>in the slope (fractions only)</h3><div class="out" id="o1b"></div></div>
</div>
<p class="note">Each turn is the same law, written in two charts: cos 2θ = (1 − s²)/(1 + s²), sin 2θ = 2s/(1 + s²),
e^(2iθ) = (1 + is)/(1 − is). NTN's checker counts a law as notation when such a restatement agrees to 10⁻³⁰ at
three or more points and carries no π, e, trigonometric, hyperbolic or logarithmic function.</p>
</div>
<div class="panel">
<h2>2. Where π is content</h2>
<p class="cap">A limit is different. Leibniz's series and Wallis's product are sums and products of fractions, and
every partial result is a fraction; the law is that they tend to π/4 and π/2. Take away π and nothing is left to
state. Every limit on both lists, 74 of them, kept its π or e.</p>
<div class="row"><label for="kk">terms</label><input id="kk" type="range" min="1" max="60" step="1" value="10"><span id="kv"></span></div>
<div class="two">
<div class="box"><h3>Leibniz: 4·(1 − 1/3 + 1/5 − …)</h3><div class="out" id="o2a"></div></div>
<div class="box"><h3>Wallis: 2·Π 4n²/(4n² − 1)</h3><div class="out" id="o2b"></div></div>
</div>
<p class="note">A count of reads closes in the same way. One read of slope 1/m composed with itself is (m + i)ⁿ in whole
numbers; the first n past the horizon, N, makes 2N/m a fraction above π by under 2/m + 2/m² (0.86 at m = 2, 7·10⁻⁶ at
m = 100,000), and only slope 1, the corner, lands on the horizon exactly, in two steps. Along the scale, (1 + 1/m)ᵐ
sits below e by about e/(2m). Every step is a fraction; the limit is neither (BLD; <a href="https://github.com/reportbase/wander/blob/main/papers/essays/25-counted-toward.md">essay 25</a>).</p>
</div>
<div class="panel">
<h2>3. All 189 laws</h2>
<p class="cap"><span class="key" style="background:var(--teal)"></span>π or e is notation (the checker found an
exact restatement) <span class="key" style="background:#3a3350"></span>π or e is content. Group them by the
list, by the blind tag (does the law relate only directions and ratios, or does an amount with a unit enter?) or
by the blind class (is π or e on a chart where turns or scalings add, in a limit or total, or neither?). Tap a
tile.</p>
<div class="row" id="gb"></div>
<div class="groups" id="groups"></div>
<div class="out" id="law"></div>
</div>
<div class="panel">
<h2>4. What sorts them</h2>
<p class="cap">The two lists differ overall: 30 of 82 against 18 of 107. Crossed by both blind sortings, the
limits are content on both lists, and the laws among directions that take no limit are notation at nearly the same
rate on both. The paper holds more of those, which is most of why its count is higher. The laws with an amount and
no limit do not agree between the lists, and the paper has only seven of them.</p>
<div class="wrap"><table id="cross"></table></div>
<div class="out" id="mix"></div>
<p class="note">Found after the runs, not predicted (DVA's predictions D1 and D2 were killed). Whether "about three in
five" holds needs a third list with that number committed first. The restatements are mine; the tags and classes
were made by fresh agents not shown the verdicts. Plans: <code>plans/ntn-plan.md</code>, <code>plans/ntx-plan.md</code>,
<code>plans/dva-plan.md</code>, <code>plans/hlx-plan.md</code>; essay 24, <i>Only a name</i>.</p>
</div>
</main>
<script type="application/json" id="data">[["NTN",1,"A point in two parts","ln(z/H) = ln(d/H) + iθ","D","A",1,"z/H = (d/H)·(1 + i·s)/sqrt(1 + s²)","The log-polar split is z = d·(h + iv): the length times the direction's shares."],["NTN",2,"The across part against an outside unit","ln(d/metre) = ln(d/H) + ln(H/metre)","A","A",1,"d/metre = (d/H)·(H/metre)","Adding logarithms of ratios is multiplying the ratios."],["NTN",9,"Heat per unit of a screen square to the look","1/(2π(1 + r²)^(3/2))","D","L",0,"","2π normalizes the density to total 1 over the screen; it is the content."],["NTN",13,"Slope and angle joined by the half-angle","s = tan(φ/2) (φ of total 2π), or s = tan θ (θ of total π)","D","A",0,"","The law is the join of a slope to an angle itself; no slope-only form."],["NTN",14,"A straight line on Euler's plane","u = ln(p/H) − ln cos(θ − φ₀)","D","A",1,"d/H = (p/H)·sqrt(1 + s²)·sqrt(1 + s₀²)/(1 + s·s₀)","The line in polar form: d/H = (p/H)/cos(θ − φ₀), and cos of a difference is rational in two slopes."],["NTN",16,"The thumb's lay as a turn","(1/Ω)·arctan(d/H) = ½ + gd(ln(d/H))/π","D","A",0,"","Both sides are the share of the turn, which needs arctan or gd and π."],["NTN",17,"A larger thumb as a boost of latitudes","tan(χ′/2) = tan(χ/2)/k","D","A",1,"t′ = t/k, t the slope of the half latitude","In half-angle slopes the boost is a division by k."],["NTN",18,"The square of the direction","(h + iv)² = e^(2iθ)","D","A",1,"(h + iv)² = (1 + i·s)²/(1 + s²)","The square of the direction is (1 + is)²/(1 + s²)."],["NTN",20,"Euler's form of the reading","1 + is = sec θ·e^(iθ); (1 + is)/(1 − is) = e^(2iθ)","D","A",1,"1 + i·s = sqrt(1 + s²)·(1 + i·s)/sqrt(1 + s²); (1 + i·s)/(1 − i·s) = (1 + i·s)²/(1 + s²)","sec θ·e^(iθ) is 1 + is, and the quotient is (1 + is)²/(1 + s²)."],["NTN",21,"Lambert's chart turned","stretch 1/cos(φ/2) at the old look","D","X",1,"stretch = sqrt(1 + t²), t the half-turn's slope","With t the slope of half the turn, 1/cos(φ/2) = sqrt(1 + t²)."],["NTN",22,"The uniform turn's law (half-Cauchy)","(1/Ω)·1/(1 + s²), s ≥ 0; share below s is (1/Ω)·arctan s","D","L",0,"","1/Ω normalizes the law and the share below s needs arctan."],["NTN",23,"A capped world's mean","(1/π)·ln(1 + M²)","D","L",0,"","The capped mean is a logarithm with a 1/π; no rational form."],["NTN",24,"Two axes drawn","reading (V/H)·tan θ, a Cauchy of scale V/H","D","A",0,"","The reading is (V/H)·s, but 'a Cauchy' carries the π of its density; restating only the reading is a part."],["NTN",25,"A lamp's landings","x = m + d·tan θ, following C(m, d)","A","A",0,"","As 24: the landing x = m + d·s is only part; the law C(m, d) carries π."],["NTN",28,"The circle divided by its own length","1 + s² = (r/x)² = sec²θ; 1/(1 + s²) = (x/r)² = h²; dθ = ds/(1 + s²)","D","A",0,"","dθ = ds/(1 + s²) is the turn's measure itself; the angle cannot be removed."],["NTN",29,"The Poisson kernel from z","p(x) = (1/π)·Im 1/(x − z), z = m + iγ; dθ/dx = γ/((x − m)² + γ²)","A","L",0,"","1/π normalizes the kernel, and dθ/dx is an angle's rate."],["NTN",30,"The Cayley map","u = (x − m)/γ, w = (1 + iu)/(1 − iu) = e^(2iθ), θ = arctan u","A","A",1,"w = (1 + i·u)/(1 − i·u) = (1 + i·u)²/(1 + u²)","e^(2iθ) with θ = arctan u is (1 + iu)²/(1 + u²); the map itself is rational."],["NTN",31,"A pole and its Fourier pair","p(x) = (γ/π)·|1/(x − z)|², transform e^(imt − γ|t|)","A","L",0,"","The Fourier pair e^(imt − γ|t|) and the 1/π are content."],["NTN",33,"Divergence between two members","2·ln cosh(d/2), d the Poincaré distance with ds² = (dm² + dγ²)/γ²; at one foot d = |ln r|","D","L",0,"","The divergence is a logarithm of a rational quantity; the log is its value."],["NTN",34,"Solid angle of a screen patch","dA/(1 + r²)^(3/2) = cos³α·dA, r = tan α","D","X",1,"dA/(1 + r²)^(3/2) = h³·dA, h = 1/sqrt(1 + r²)","cos³α is h³ = (1 + r²)^(−3/2)."],["NTN",35,"Share of directions within α","1 − cos α","D","X",1,"share = 1 − 1/sqrt(1 + r²), r the slope of α","1 − cos α is 1 − h."],["NTN",36,"The wall's kernel","dν/dλ = (1/π)·d/(d² + y²)","A","L",0,"","1/π normalizes the wall's kernel."],["NTN",37,"The half-space kernel","Γ(n/2)/π^(n/2)·d/|x|^n = (2/|S^(n−1)|)·d/|x|^n; in space (1/2π)·d/(d² + r²)^(3/2)","A","L",0,"","Γ(n/2)/π^(n/2) is the sphere's area; content."],["NTN",38,"Poisson semigroup and heat kernel","e^(−d|k|) (stepping back composes); Gaussian e^(−tk²)","A","A",0,"","The semigroup e^(−d|k|) and the Gaussian are exponentials in k."],["NTN",41,"What is counted along the directions","ρ(θ)·1/(Ω(1 + s²))","D","L",0,"","1/Ω normalizes the turn's law."],["NTN",42,"Cauchy blur","transform e^(−γ|k|); undone by e^(γ|k|)","A","L",0,"","e^(−γ|k|) is the blur's transform; content."],["NTN",43,"The lighthouse","(x − α)/β = tan θ","A","A",1,"(x − α)/β = s","The lighthouse's tan θ is the lamp's slope."],["NTN",44,"Mercator's bearings","tan ψ′ = tan ψ/c; area stretched by sec² latitude; equal-area chart c = cos² latitude","D","A",1,"s′ = s/c; area stretch = 1 + t²; equal-area c = 1/(1 + t²), t the latitude's slope","tan is the bearing's slope; sec² and cos² of latitude are 1 + t² and 1/(1 + t²)."],["NTN",45,"Aberration","cos θ′ = (cos θ + β)/(1 + β cos θ); on the stereographic chart z ↦ z/k, k = e^η","D","A",1,"c = (1 − t²)/(1 + t²): c′ = (c + β)/(1 + β·c); t′ = t·sqrt((1 − β)/(1 + β))","Aberration is rational in the half-angle slope t, and k = e^η is sqrt((1 + β)/(1 − β))."],["NTN",46,"Boosted uniform sky","density D²/4π","D","L",0,"","4π is the sphere's total; content."],["NTN",47,"The sky's uniform heat on the stereographic chart","(1/π)·dA/(1 + |z|²)²","D","L",0,"","1/π normalizes the sky's heat."],["NTN",48,"Doppler factor","D = √(1 − β²)/(1 − β cos θ′); D⁴ = D² (directions) × D² (payload)","D","X",1,"D = sqrt(1 − β²)·(1 + t²)/((1 + t²) − β·(1 − t²)); D⁴ = D²·D²","cos θ′ in the half-angle slope makes D rational times sqrt(1 − β²)."],["NTN",49,"Pseudorapidity","ξ = −ln tan(θ/2), aberration a slide by η","D","A",0,"","Pseudorapidity is itself a logarithm, the chart on which a boost is a slide."],["NTN",50,"The overlay's heat in distance","per unit distance 1/(Ω(1 + x²)); per unit of ln(d/H), (1/Ω)·x/(1 + x²) = (1/π)·sech(ln(d/H))","D","A",0,"","1/Ω normalizes both densities."],["NTN",51,"K places in distance","d/H = tan(kΩ/K)","D","A",0,"","Places even in angle need tan(kΩ/K); π sets them."],["NTN",52,"Share past x thumbs = share below 1/x","(1/Ω)·arctan(1/x)","D","L",0,"","The share needs arctan and 1/Ω."],["NTN",53,"Lambert's equal-area radius","R(α) = 2·sin(α/2)","D","X",1,"R = 2·t/sqrt(1 + t²)","2·sin(α/2) is 2t/sqrt(1 + t²), t the half-angle's slope."],["NTN",54,"The ground's reading","share below D/ρ, (1/Ω)·arctan(D/ρ)","D","L",0,"","The share needs arctan and 1/Ω."],["NTN",55,"Scale shares","(1/2Ω)·sech(ln s); sech(k·ln 2) at k scales from the focus","D","A",0,"","1/(2Ω) normalizes the scale shares."],["NTN",56,"The dial","place H·sinh ζ, needle at gd ζ, needle turn per unit place cos²θ","D","A",0,"","The dial's push ζ is a hyperbolic coordinate and the needle turn an angle rate."],["NTN",57,"Height smooths an outline","circle k shrunk by e^(−γ|k|)","D","L",0,"","e^(−γ|k|) on circle k is content."],["NTN",58,"Parallax depth from two inward reads","cot a + cot b = B/(distance from the step's line)","D","X",1,"1/s_a + 1/s_b = B/(distance from the step's line)","cot is the reciprocal slope."],["NTN",60,"Depth's Cauchy point","D = B/conj(w_a + w_b); at the corner D = d·(1 + iγ)/(1 − iγ) = d·e^(2i·atan γ)","D","A",1,"D = B/conj(w_a + w_b); at the corner D = d·(1 + i·γ)/(1 − i·γ)","d·e^(2i·atan γ) is d·(1 + iγ)/(1 − iγ)."],["NTN",61,"Extent across the line of sight","−1 + 2·cot a/(cot a + cot b) half-steps","D","X",1,"−1 + 2·s_b/(s_a + s_b) half-steps","cot is the reciprocal slope, so the extent is rational in two slopes."],["NTN",62,"Sum of two half-Cauchys near zero","density (1/Ω²)·s","D","L",0,"","1/Ω² normalizes the sum's density."],["NTN",67,"Turn taken in per ratio and per distance walked","sech x per unit x = ln(V*/2d); dα/dℓ = V*/((V*/2)² + d²)","A","A",0,"","The turn taken in (dα) is an angle measure; content."],["NTN",73,"Parallax error per unit angle","ε·cosh(ln k) = ε·(k + 1/k)/2, k = d/(B/2)","D","A",1,"ε·(k + 1/k)/2","cosh(ln k) is (k + 1/k)/2, as the law itself says."],["NTN",74,"The thing itself as unit","standpoint at 1/(2t) of its breadth, t = tan(α/2)","D","A",1,"standpoint at 1/(2t) of its breadth, t the half-angle's slope","t is already the half-angle's slope."],["NTN",75,"Gaps along a chain add; a loop's gaps sum to zero","(ln gaps)","D","A",1,"c/a = (b/a)·(c/b); (b/a)·(c/b)·(a/c) = 1","Gaps in logarithms adding is ratios multiplying; a loop's product is 1."],["NTN",77,"A candle's distance","d = √(L/4πF); receiver's share (Δ/d)²","A","L",0,"","4π is the sphere's area in the candle's distance."],["NTN",78,"A disc's light on its axis","E/(πL) = 1/(1 + s²), s = d/a; E(s) + E(1/s) = πL","D","L",0,"","πL is the source's exitance; only the ratio E/(πL) is rational."],["NTN",80,"The round source's pairing","sin²α + cos²α = 1","D","X",1,"s²/(1 + s²) + 1/(1 + s²) = 1","sin² and cos² are the shares v² and h²."],["NTN",81,"Passing energy, matched load, normal incidence","4k/(1 + k)² = sech²(½ ln k)","D","A",1,"4k/(1 + k)²","sech²(½ ln k) is 4k/(1 + k)², the law's own left side."],["NTN",82,"Driven series RLC","P/P_max = 1/(1 + s²), s = 2Q·sinh(ln(ω/ω₀)), unchanged by ω ↔ ω₀²/ω","D","A",1,"P/P_max = 1/(1 + s²), s = Q·(ω/ω₀ − ω₀/ω)","2Q·sinh(ln r) is Q·(r − 1/r)."],["NTN",83,"Pendulum and Kepler","T·√(g/ℓ) a function of amplitude alone; T·√(GM/a³) = 2π","A","X",0,"","The period's 2π and the pendulum's elliptic function are content."],["NTN",84,"Two-dimensional Cauchy on the wedge","1/(Ω(1 + a² + b²)^(3/2))","D","L",0,"","1/Ω normalizes the wedge's law."],["NTN",86,"Near-field filling","H/(Ω(H² + d²)) along each ray","A","L",0,"","1/Ω normalizes the filling."],["NTN",87,"Heat of a dot","cos³α × sech(ln(d/H))","D","A",1,"(1 + r²)^(−3/2) × 2x/(1 + x²), x = d/H","cos³α is (1 + r²)^(−3/2) and sech(ln x) is 2x/(1 + x²)."],["NTN",88,"Cartesian from the read","X = H·cos a·cos ψ","D","X",1,"X = H/sqrt((1 + s_a²)(1 + s_ψ²))","cos a and cos ψ are the shares of the two sweeps' slopes."],["NTN",89,"Two-turn loop","cos(Θ/2) = 1 − 2·sin²(α/2)·sin²(β/2)·sin²φ ≈ αβ·sin φ","D","X",0,"","The exact relation is rational in the half-turn slopes and φ's slope (the ≈ is its leading order)."],["NTN",90,"Turn and unequal stretch loop","cosh ζ = 1 + 2·sin²α·sinh²(½ ln c) ≈ |α·ln c|","D","X",0,"","sin²α is s²/(1 + s²) and sinh²(½ ln c) is (c − 2 + 1/c)/4 (the ≈ is its leading order)."],["NTN",91,"Collinear boosts","(β₁ + β₂)/(1 + β₁β₂), the tanh of the summed rapidities","D","A",1,"(β₁ + β₂)/(1 + β₁β₂)","The tanh of summed rapidities is the law's own rational form."],["NTN",92,"Thomas–Wigner rotation","tan(Θ/2) = ab·sin φ/(1 + ab·cos φ)","D","X",0,"","sin φ and cos φ in φ's slope make the half-turn slope rational with one root."],["NTN",93,"The blueprint's arc over chord and chord over arc","(θ/sin θ)·(sin θ/θ) = 1","D","X",0,"","The two measures need the arc θ itself; their product alone is a part."],["NTN",95,"No trig in the keep rule","√cosh(ln ρ) = √((ρ + 1/ρ)/2)","D","A",1,"sqrt((ρ + 1/ρ)/2)","cosh(ln ρ) is (ρ + 1/ρ)/2, as the law itself says."],["NTN",99,"Gregory–Leibniz","Ω/2 = 1 − 1/3 + 1/5 − …","D","L",0,"","A series for Ω; π is its value."],["NTN",100,"ln 2 and e as series","ln 2 = 1 − 1/2 + 1/3 − …; e = lim (1 + 1/n)ⁿ = 1 + 1 + 1/2! + 1/3! + …","D","L",0,"","Series and a limit for ln 2 and e; the constants are the content."],["NTN",101,"Euler's formula as a count of reads","(1 + iθ/n)ⁿ → e^(iθ); angle short by θ − n·arctan(θ/n) ≈ θ³/(3n²); length (1 + θ²/n²)^(n/2), ≈ θ²/(2n)","D","L",0,"","e^(iθ) as a limit and the angle's shortfall need the angle and e."],["NTN",102,"Trotter leftover in space","(θ₁θ₂/2)·sin(φ/2)/(φ/2)","D","X",0,"","sin(φ/2)/(φ/2) needs the angle itself."],["NTN",104,"The kernel as the arc's rate","(1/2i)·d(ln w)/ds = 1/(1 + s²); ∫₀^∞ ds/(1 + s²) = Ω","D","A",0,"","The integral's value is Ω."],["NTN",106,"The residue at the standpoint","∫ (1/π)·γ/((s − m)² + γ²)·e^(its) ds = e^(imt − γ|t|)","D","L",0,"","The transform e^(imt − γ|t|) and 1/π are content."],["NTN",107,"Double pole","Student's t₃ transform (1 + t)·e^(−t)","D","L",0,"","The transform (1 + t)e^(−t) is content."],["NTN",108,"The two facings","Ω · 1/Ω = 1; s·(1/s) = 1; x·(1/x) = 1; (p/q)·(q/p) = 1","D","X",1,"x·(1/x) = 1 for any x (s·(1/s) = 1; (p/q)·(q/p) = 1)","Ω's value plays no part: the identity is a number times its reciprocal."],["NTN",109,"The total","(1/Ω)·∫₀^∞ ds/(1 + s²) = 1; ∫₀¹ ds/(1 + s²) = ∫₁^∞ ds/(1 + s²)","D","L",0,"","1/Ω normalizes the total to 1."],["NTN",112,"The Gaussian in polar form","(1/2π)·e^(−r²/2) dx dy = (dθ/2π)·(e^(−r²/2) r dr); ∫₀^∞ e^(−r²/2)·r dr = 1","A","L",0,"","2π and the Gaussian's e are content."],["NTN",115,"Wallis's product","Ω = (2·2)/(1·3) × (4·4)/(3·5) × (6·6)/(5·7) × …","D","L",0,"","Wallis's product's value is Ω."],["NTN",116,"Binomial","C(n, k)/2ⁿ, mean n/2, variance n/4; limit e^(−x²/2)/√(2π)","A","L",0,"","The limit e^(−x²/2)/sqrt(2π) is content."],["NTN",118,"The Cauchy in the log chart","s = e^ξ gives (1/π)·sech ξ, h² = 1/(1 + e^(2ξ))","D","A",0,"","The log chart s = e^ξ and 1/π are content."],["NTN",120,"Odd sums","Σ_odd 1/n² = ½·Ω²; then Ω⁴/6, Ω⁶/15","D","L",0,"","The sums' values are powers of Ω."],["NTN",121,"Euler's expansion of the slope","slope at x = Σ_(m odd) 2x/((m·Ω)² − x²)","D","L",0,"","The poles sit at odd multiples of Ω."],["NTN",122,"Basel","Σ 1/n² = ⅔·Ω² = π²/6; squarefree share (3/2)·(1/Ω)²","D","L",0,"","Basel's value is π²/6."],["NTN",123,"Parallax angles about the half-step","γ(d) + γ(a²/d) = π","D","A",1,"t(d)·t(a²/d) = 1, t(d) = a/d the slope of γ(d)/2","With t = a/d the half-angle slope, the two half-angles are reciprocal slopes."],["NTX",1,"Circumference of a circle","C = 2πr","A","L",0,"","circumference in terms of r needs pi"],["NTX",2,"Area of a circle","A = πr²","A","L",0,"","area in terms of r needs pi"],["NTX",3,"Volume of a sphere","V = (4/3)πr³","A","L",0,"","volume in terms of r needs pi"],["NTX",4,"Surface area of a sphere","A = 4πr²","A","L",0,"","surface area needs pi"],["NTX",5,"Volume of a cone","V = (1/3)πr²h","A","L",0,"","cone volume needs pi"],["NTX",6,"Area of an ellipse","A = πab","A","L",0,"","ellipse area needs pi"],["NTX",7,"Arc length","s = rθ, full turn 2π rad","A","A",0,"","arc length from an angle in radians; full turn 2pi is content"],["NTX",8,"Area of a spherical triangle (Girard)","A = R²(α + β + γ − π)","A","A",0,"","angle excess with pi; angles summed as amounts"],["NTX",9,"Pythagorean identity","sin²θ + cos²θ = 1","D","A",1,"h^2 + v^2 = 1 with h = 1/sqrt(1+s^2), v = s/sqrt(1+s^2)","cos and sin of the angle are the shares h, v"],["NTX",10,"Angle addition (sine)","sin(α + β) = sin α cos β + cos α sin β","D","A",0,"","sine of the sum by the two slopes"],["NTX",11,"Tangent addition","tan(α + β) = (tan α + tan β)/(1 − tan α tan β)","D","A",1,"(s + t)/(1 - s t)","tangent addition is slope addition"],["NTX",12,"Double angle","cos 2θ = cos²θ − sin²θ = 1 − 2sin²θ","D","A",1,"h^2 - v^2 = 1 - 2 v^2 = (1 - s^2)/(1 + s^2)","double angle by the slope"],["NTX",13,"Law of cosines","c² = a² + b² − 2ab cos C","A","A",1,"c^2 = a^2 + b^2 - 2ab (1 - t^2)/(1 + t^2)","cos C by the half-angle slope t"],["NTX",14,"Law of sines","a/sin A = b/sin B = c/sin C = 2R","A","A",1,"a = 2R*2tA/(1+tA^2), b = 2R*2tB/(1+tB^2), c = 2R*2tC/(1+tC^2), tC = (1 - tA tB)/(tA + tB)","sines by half-angle slopes; third half-slope (1 - tA tB)/(tA + tB)"],["NTX",15,"Half-angle tangent","tan(θ/2) = sin θ/(1 + cos θ)","D","A",1,"v/(1 + h) = s/(1 + sqrt(1 + s^2))","half-angle slope from the slope"],["NTX",16,"Complementary arctangents","arctan x + arctan(1/x) = π/2 for x > 0","D","A",0,"","the value pi/2 of a sum of angles is content"],["NTX",17,"Machin's formula","π/4 = 4 arctan(1/5) − arctan(1/239)","D","A",0,"","a value of pi"],["NTX",18,"Euler's formula","e^(iθ) = cos θ + i sin θ","D","A",1,"(1 + i t)/(1 - i t)","the unit complex number by the half-angle slope"],["NTX",19,"Euler's identity","e^(iπ) + 1 = 0","D","A",0,"","a single statement at the angle pi; no domain to restate over"],["NTX",20,"De Moivre's formula","(cos θ + i sin θ)ⁿ = cos nθ + i sin nθ","D","A",1,"((1 + i t)/(1 - i t))^n = ((1 - t^2 + 2 i t)/(1 + t^2))^n","powers of the unit number by the half-angle slope"],["NTX",21,"Definition of e","e = lim_(n→∞) (1 + 1/n)ⁿ","D","L",0,"","e defined as a limit"],["NTX",22,"Exponential series","eˣ = Σ_(n≥0) xⁿ/n!","D","L",0,"","exponential function of x"],["NTX",23,"Taylor series of sine","sin x = x − x³/3! + x⁵/5! − …","D","L",0,"","sine of an angle in radians as a series"],["NTX",24,"Leibniz series","π/4 = 1 − 1/3 + 1/5 − 1/7 + …","D","L",0,"","a value of pi"],["NTX",25,"Basel problem","Σ_(n≥1) 1/n² = π²/6","D","L",0,"","a value of pi"],["NTX",26,"ζ(4)","Σ_(n≥1) 1/n⁴ = π⁴/90","D","L",0,"","a value of pi"],["NTX",27,"Wallis product","π/2 = Π_(n≥1) 4n²/(4n² − 1)","D","L",0,"","a value of pi"],["NTX",28,"Gaussian integral","∫_(−∞)^(∞) e^(−x²) dx = √π","D","L",0,"","a value of pi"],["NTX",29,"Stirling's approximation","n! ≈ √(2πn) (n/e)ⁿ","D","L",0,"","pi and e in the asymptotic"],["NTX",30,"Gamma at one half","Γ(1/2) = √π","D","L",0,"","a value of pi"],["NTX",31,"Euler reflection formula","Γ(z)Γ(1 − z) = π/sin(πz)","D","L",0,"","Gamma and sin(pi z)"],["NTX",32,"Dirichlet integral","∫₀^∞ (sin x)/x dx = π/2","D","L",0,"","a value of pi"],["NTX",33,"Integral of the Lorentzian","∫_(−∞)^(∞) dx/(1 + x²) = π","D","L",0,"","a value of pi (a total)"],["NTX",34,"Cauchy integral formula","f(a) = (1/2πi) ∮ f(z)/(z − a) dz","D","L",0,"","2 pi i normalization"],["NTX",35,"Residue theorem","∮ f(z) dz = 2πi Σ Res f","D","L",0,"","2 pi i total"],["NTX",36,"Natural logarithm as integral","ln x = ∫₁^x dt/t","D","A",0,"","logarithm"],["NTX",37,"Derivative of arctangent","d/dx arctan x = 1/(1 + x²)","D","A",1,"1/(1 + s^2) = h^2","the turn per slope is h^2"],["NTX",38,"Hyperbolic identity","cosh²x − sinh²x = 1","D","A",1,"((k + 1/k)/2)^2 - ((k - 1/k)/2)^2 = 1","hyperbolic functions by k = e^x"],["NTX",39,"Hyperbolic cosine","cosh x = (eˣ + e^(−x))/2","D","A",1,"(k + 1/k)/2","cosh by k = e^x"],["NTX",40,"Prime number theorem","π(x) ~ x/ln x","A","L",0,"","logarithm"],["NTX",41,"Coprime probability","P(two random integers coprime) = 6/π²","D","L",0,"","a value with pi"],["NTX",42,"Harmonic numbers","H_n = ln n + γ + O(1/n)","D","L",0,"","logarithm and gamma"],["NTX",43,"Normal density","f(x) = (1/(σ√(2π))) exp(−(x − μ)²/(2σ²))","A","L",0,"","1/sqrt(2 pi) and exp"],["NTX",44,"Standard Cauchy density","f(x) = 1/(π(1 + x²))","D","L",0,"","1/pi normalization"],["NTX",45,"Cauchy distribution function","F(x) = ½ + (1/π) arctan((x − m)/γ)","A","A",0,"","arctan and 1/pi"],["NTX",46,"Exponential density","f(t) = λe^(−λt)","A","A",0,"","exp decay"],["NTX",47,"Poisson distribution","P(k) = λᵏ e^(−λ)/k!","A","L",0,"","e^-lambda"],["NTX",48,"Buffon's needle","P(cross) = 2ℓ/(πd)","D","L",0,"","pi in the probability"],["NTX",49,"Rayleigh density","f(r) = (r/σ²) e^(−r²/(2σ²))","A","A",0,"","exp"],["NTX",50,"Normal characteristic function","φ(t) = exp(iμt − σ²t²/2)","A","A",0,"","exp of t"],["NTX",51,"Shannon entropy of a Gaussian","h = ½ ln(2πeσ²)","A","L",0,"","log, pi, e"],["NTX",52,"Maxwell–Boltzmann speed distribution","f(v) = 4π (m/(2πkT))^(3/2) v² e^(−mv²/(2kT))","A","L",0,"","pi and exp"],["NTX",53,"Boltzmann factor","P ∝ e^(−E/kT)","A","A",0,"","exp"],["NTX",54,"Boltzmann entropy","S = k ln W","A","A",0,"","log"],["NTX",55,"Isothermal work of an ideal gas","W = nRT ln(V₂/V₁)","A","A",0,"","log"],["NTX",56,"Planck's radiation law","B_ν = (2hν³/c²) · 1/(e^(hν/kT) − 1)","A","L",0,"","exp"],["NTX",57,"Stefan–Boltzmann constant","σ = 2π⁵k⁴/(15h³c²)","A","L",0,"","pi^5 constant"],["NTX",58,"Arrhenius equation","k = A e^(−E_a/(RT))","A","A",0,"","exp"],["NTX",59,"Barometric formula","p(h) = p₀ e^(−Mgh/(RT))","A","A",0,"","exp"],["NTX",60,"Fermi–Dirac distribution","f(E) = 1/(e^((E − μ)/kT) + 1)","A","A",0,"","exp"],["NTX",61,"Coulomb's law","F = q₁q₂/(4πε₀r²)","A","L",0,"","4 pi constant"],["NTX",62,"Field of a long straight wire","B = μ₀I/(2πr)","A","L",0,"","2 pi"],["NTX",63,"Biot–Savart law","dB = (μ₀/4π) I dl × r̂/r²","A","L",0,"","4 pi"],["NTX",64,"Capacitance of a parallel plate (Gaussian units)","C = A/(4πd)","A","L",0,"","4 pi"],["NTX",65,"Speed of light","c = 1/√(μ₀ε₀) with μ₀ = 4π × 10⁻⁷ H/m (pre-2019 SI)","A","X",0,"","4 pi in mu0"],["NTX",66,"Inverse square of a point source","I = P/(4πr²)","A","L",0,"","4 pi sphere total"],["NTX",67,"Malus's law","I = I₀ cos²θ","D","A",1,"I = I0/(1 + s^2)","cos^2 is the share h^2"],["NTX",68,"Snell's law","n₁ sin θ₁ = n₂ sin θ₂","D","A",0,"","refraction by slopes"],["NTX",69,"Brewster's angle","tan θ_B = n₂/n₁","D","A",1,"s_B = n2/n1","Brewster angle is the slope n2/n1"],["NTX",70,"Double-slit intensity","I = I₀ cos²(πd sin θ/λ)","A","A",0,"","pi d sin theta / lambda is a phase in radians"],["NTX",71,"Single-slit diffraction","I = I₀ (sin β/β)², β = πa sin θ/λ","A","A",0,"","phase in radians and sin beta/beta"],["NTX",72,"Rayleigh criterion","sin θ = 1.22 λ/D","A","A",0,"","1.22 carries a Bessel zero over pi"],["NTX",73,"Beer–Lambert law","I = I₀ e^(−μx)","A","A",0,"","exp"],["NTX",74,"RC charging","V(t) = V₀(1 − e^(−t/RC))","A","A",0,"","exp"],["NTX",75,"RL current rise","I(t) = (V/R)(1 − e^(−Rt/L))","A","A",0,"","exp"],["NTX",76,"LC resonance","f₀ = 1/(2π√(LC))","A","A",0,"","2 pi"],["NTX",77,"Capacitive reactance","X_C = 1/(2πfC)","A","A",0,"","2 pi"],["NTX",78,"RMS of a sine wave","V_rms = V₀/√2, mean of |sin| = 2V₀/π","D","L",0,"","mean of |sin| 2/pi is content"],["NTX",79,"Decibels","L = 10 log₁₀(P/P₀) dB","D","A",0,"","log"],["NTX",80,"Fourier transform","F(ω) = ∫ f(t) e^(−iωt) dt","A","A",0,"","exp of omega t"],["NTX",81,"Fourier series","f(t) = a₀/2 + Σ (aₙ cos nω₀t + bₙ sin nω₀t)","A","A",0,"","cos of n omega t"],["NTX",82,"Sinc function and its transform","sinc x = sin(πx)/(πx) ↔ rect","D","A",0,"","sin(pi x)/(pi x)"],["NTX",83,"First-order low-pass cutoff","f_c = 1/(2πRC)","A","A",0,"","2 pi"],["NTX",84,"Shannon–Hartley capacity","C = B log₂(1 + S/N)","A","A",0,"","log"],["NTX",85,"Simple harmonic motion","x(t) = A cos(ωt + φ)","A","A",0,"","cos of omega t"],["NTX",86,"Pendulum period","T = 2π√(L/g)","A","A",0,"","2 pi"],["NTX",87,"Mass–spring period","T = 2π√(m/k)","A","A",0,"","2 pi"],["NTX",88,"Kepler's third law","T² = 4π²a³/(GM)","A","A",0,"","4 pi^2"],["NTX",89,"Damped oscillator","x(t) = A e^(−γt) cos(ω_d t + φ)","A","A",0,"","exp and cos of t"],["NTX",90,"Tsiolkovsky rocket equation","Δv = v_e ln(m₀/m_f)","D","A",0,"","log"],["NTX",91,"Projectile range","R = v₀² sin 2θ/g","A","A",1,"R = v0^2 * 2s/(1 + s^2) / g","sin 2 theta by the slope"],["NTX",92,"Capstan equation","T_load = T_hold e^(μφ)","D","A",0,"","exp of an angle in radians"],["NTX",93,"Catenary","y = a cosh(x/a)","A","A",0,"","cosh of x/a"],["NTX",94,"Radioactive decay","N(t) = N₀ e^(−λt), t½ = ln 2/λ","A","A",0,"","exp and ln 2"],["NTX",95,"Reduced Planck constant","ħ = h/(2π)","A","A",0,"","2 pi"],["NTX",96,"Free-particle plane wave","ψ(x, t) = A e^(i(kx − ωt))","A","A",0,"","exp of a phase"],["NTX",97,"Particle in a box energies","Eₙ = n²π²ħ²/(2mL²)","A","A",0,"","pi^2"],["NTX",98,"Bohr radius","a₀ = 4πε₀ħ²/(mₑe²)","A","L",0,"","4 pi"],["NTX",99,"Fine-structure constant","α = e²/(4πε₀ħc)","A","L",0,"","4 pi"],["NTX",100,"Tunnelling probability","T ≈ e^(−2κL), κ = √(2m(V − E))/ħ","A","A",0,"","exp"],["NTX",101,"Breit–Wigner (Lorentzian) line","σ(E) ∝ (Γ/2)²/((E − E₀)² + (Γ/2)²)","A","X",1,"(G/2)^2/((E - E0)^2 + (G/2)^2) = 1/(1 + x^2)","the line shape is the share h^2 of x = (E - E0)/(Gamma/2)"],["NTX",102,"Lorentz factor by rapidity","γ = cosh η, βγ = sinh η, β = tanh η","D","A",1,"gamma = (k + 1/k)/2, beta gamma = (k - 1/k)/2, beta = (k^2 - 1)/(k^2 + 1)","rapidity by k = e^eta"],["NTX",103,"Relativistic Doppler","f′ = f √((1 + β)/(1 − β)) = f e^η","D","A",1,"f' = f sqrt((1 + beta)/(1 - beta))","e^eta is sqrt((1+beta)/(1-beta))"],["NTX",104,"Relativistic aberration","tan(θ′/2) = √((1 − β)/(1 + β)) tan(θ/2)","D","A",1,"t' = sqrt((1 - beta)/(1 + beta)) t","half-angle slopes"],["NTX",105,"Einstein field equations","G_μν = (8πG/c⁴) T_μν","A","L",0,"","8 pi constant"],["NTX",106,"Schwarzschild horizon area entropy","S = kc³A/(4Għ), A = 4πr_s²","A","L",0,"","4 pi area"],["NTX",107,"Hawking temperature","T = ħc³/(8πGMk)","A","A",0,"","8 pi"]]</script>
<script>
'use strict';
const $ = id => document.getElementById(id);
const LAWS = JSON.parse($('data').textContent).map(r => ({ list: r[0], n: r[1], name: r[2], formula: r[3], tag: r[4],
cls: r[5], notation: !!r[6], restated: r[7], reason: r[8], id: r[0] + '-' + r[1] }));
const LISTNAME = { NTN: 'Reads and Writes (82)', NTX: 'standard formulas (107)' };
const TAGNAME = { D: 'directions and ratios', A: 'an amount with a unit' };
const CLSNAME = { A: 'on a chart (turns or scalings add)', L: 'a limit or a total', X: 'neither' };
// exact fractions
const gcd = (a, b) => { a = a < 0n ? -a : a; b = b < 0n ? -b : b; while (b) [a, b] = [b, a % b]; return a };
function F(p, q = 1n) { p = BigInt(p); q = BigInt(q); if (q < 0n) { p = -p; q = -q } const g = gcd(p, q) || 1n; return { p: p / g, q: q / g } }
const add = (a, b) => F(a.p * b.q + b.p * a.q, a.q * b.q), sub = (a, b) => F(a.p * b.q - b.p * a.q, a.q * b.q);
const mul = (a, b) => F(a.p * b.p, a.q * b.q), div = (a, b) => F(a.p * b.q, a.q * b.p);
const num = a => Number(a.p) / Number(a.q);
const str = a => a.q === 1n ? `${a.p}` : `${a.p}/${a.q}`;
const short = (a, k = 40) => { const s = str(a); return s.length > k ? `(${a.p.toString().length}-digit)/(${a.q.toString().length}-digit)` : s };
const digits = a => a.p.toString().replace('-', '').length + a.q.toString().length;
// 1. one turn: w(s) = (1 + is)/(1 - is) = ((1 - s^2) + 2is)/(1 + s^2); n turns by complex multiplication of fractions
function turn(s) { const s2 = mul(s, s), d = add(F(1), s2); return { re: div(sub(F(1), s2), d), im: div(mul(F(2), s), d) } }
function cmul(a, b) { return { re: sub(mul(a.re, b.re), mul(a.im, b.im)), im: add(mul(a.re, b.im), mul(a.im, b.re)) } }
function turns(s, n) { const w = turn(s); let z = { re: F(1), im: F(0) }; for (let k = 0; k < n; k++) z = cmul(z, w); return z }
function classical(s, n) { const th = Math.atan(s); return { re: Math.cos(2 * n * th), im: Math.sin(2 * n * th), th } }
const SLOPES = ['1/8', '1/3', '1/2', '2/3', '1', '3/2', '2', '5', '7/24'];
function parseFrac(t) { const m = String(t).match(/^(-?\d+)(?:\/(\d+))?$/); return m ? F(m[1], m[2] || 1) : F(1, 2) }
function back(s, n) { const z = turns(s, n), wbar = turns(F(-s.p, s.q), n); return cmul(z, wbar) }
const st = { s: '1/2', n: 3, k: 10, group: 'list', law: null };
function draw1() {
const s = parseFrac(st.s), n = st.n, z = turns(s, n), c = classical(num(s), n), r = back(s, n);
$('nv').textContent = n;
$('o1a').textContent = `θ = arctan(${st.s}) = ${c.th.toFixed(15)} rad\n (a share of π: θ/π = ${(c.th / Math.PI).toFixed(15)})\n` +
`after ${n} turn${n > 1 ? 's' : ''}: angle 2nθ = ${(2 * n * c.th).toFixed(12)}\n` +
`cos = ${c.re.toPrecision(17)}\nsin = ${c.im.toPrecision(17)}\n` +
`off from the exact by ${Math.max(Math.abs(c.re - num(z.re)), Math.abs(c.im - num(z.im))).toExponential(1)}`;
$('o1b').textContent = `one turn: ((1 − s²) + 2is)/(1 + s²) = ${str(turn(s).re)} + i·${str(turn(s).im)}\n` +
`after ${n}: ${short(z.re)}\n + i·${short(z.im)}\n` +
` ≈ ${num(z.re).toPrecision(17)} + i·${num(z.im).toPrecision(17)}\n` +
`h² + v² = ${str(add(mul(z.re, z.re), mul(z.im, z.im)))} exactly; ${digits(z.re) + digits(z.im)} digits held\n` +
`${n} turns, then ${n} back: ${str(r.re)} + i·${str(r.im)}`;
}
// 2. limits
function leibniz(k) { let s = F(0); for (let j = 0; j < k; j++) s = (j % 2 ? sub : add)(s, F(1, 2 * j + 1)); return mul(F(4), s) }
function wallis(k) { let p = F(1); for (let j = 1; j <= k; j++) p = mul(p, F(4 * j * j, 4 * j * j - 1)); return mul(F(2), p) }
function draw2() {
const k = st.k, a = leibniz(k), b = wallis(k);
$('kv').textContent = k;
for (const [id, v] of [['o2a', a], ['o2b', b]])
$(id).textContent = `${k} terms: ${short(v, 48)}\n = ${num(v).toPrecision(16)}\nπ − it = ${(Math.PI - num(v)).toExponential(3)}\n` +
`a fraction at every step; π at none`;
}
// 3. tiles
const GROUPS = { list: ['list', LISTNAME], tag: ['tag', TAGNAME], cls: ['cls', CLSNAME], cross: null };
function groupsOf(by) {
if (by === 'cross') {
const out = [];
for (const L of ['NTN', 'NTX']) for (const t of ['D', 'A']) for (const lim of [false, true])
out.push({ name: `${L === 'NTN' ? 'Reads and Writes' : 'standard'} · ${TAGNAME[t]} · ${lim ? 'a limit or total' : 'no limit'}`,
laws: LAWS.filter(x => x.list === L && x.tag === t && (x.cls === 'L') === lim) });
return out;
}
const [key, names] = GROUPS[by];
return Object.keys(names).map(k => ({ name: names[k], laws: LAWS.filter(x => x[key] === k) }));
}
function drawTiles() {
$('gb').innerHTML = '';
for (const [k, t] of [['list', 'by list'], ['tag', 'by tag'], ['cls', 'by class'], ['cross', 'by list, tag and limit']]) {
const b = document.createElement('button'); b.textContent = t; b.className = st.group === k ? 'on' : '';
b.onclick = () => { st.group = k; drawTiles() }; $('gb').appendChild(b);
}
const g = $('groups'); g.innerHTML = '';
for (const G of groupsOf(st.group)) {
const laws = [...G.laws].sort((a, b) => (b.notation - a.notation) || a.list.localeCompare(b.list) || a.n - b.n);
const yes = laws.filter(x => x.notation).length;
const d = document.createElement('div'); d.className = 'grp';
d.innerHTML = `<div class="hd"><span>${G.name}</span><span>${yes} of ${laws.length} notation` +
`${laws.length ? ` · ${Math.round(100 * yes / laws.length)}%` : ''}</span></div><div class="tiles"></div>` +
`<div class="bar"><i style="width:${laws.length ? 100 * yes / laws.length : 0}%"></i></div>`;
const tl = d.querySelector('.tiles');
for (const L of laws) {
const b = document.createElement('button'); b.className = 'tile' + (L.notation ? ' yes' : '') + (st.law === L.id ? ' sel' : '');
b.title = `${L.list} ${L.n}: ${L.name}`; b.setAttribute('aria-label', b.title);
b.onclick = () => { st.law = L.id; drawTiles() }; tl.appendChild(b);
}
g.appendChild(d);
}
const L = LAWS.find(x => x.id === st.law);
$('law').textContent = L ? `${L.list === 'NTN' ? 'Reads and Writes' : 'standard'} law ${L.n}: ${L.name}\n ${L.formula}\n` +
`tag: ${TAGNAME[L.tag]} · class: ${CLSNAME[L.cls]}\n` +
(L.notation ? `π or e is notation. Restated: ${L.restated}\n (${L.reason})` : `π or e is content: ${L.reason}`) :
'Tap a tile to see its law.';
}
// 4. cross-table
function cell(list, tag, lim) { const s = LAWS.filter(x => x.list === list && x.tag === tag && (x.cls === 'L') === lim); return { n: s.length, y: s.filter(x => x.notation).length } }
function cross() {
const out = {};
for (const L of ['NTN', 'NTX']) for (const t of ['D', 'A']) for (const lim of [false, true]) out[`${L}.${t}.${lim ? 'L' : 'nl'}`] = cell(L, t, lim);
return out;
}
function drawCross() {
const c = cross(), f = x => `${x.y} of ${x.n}${x.n ? ` · ${Math.round(100 * x.y / x.n)}%` : ''}`;
let h = '<tr><th></th><th>Reads and Writes</th><th>standard formulas</th></tr>';
for (const [t, lim, name] of [['D', false, 'directions, no limit'], ['D', true, 'directions, a limit or total'],
['A', false, 'an amount, no limit'], ['A', true, 'an amount, a limit or total']])
h += `<tr><td>${name}</td><td class="num">${f(c[`NTN.${t}.${lim ? 'L' : 'nl'}`])}</td><td class="num">${f(c[`NTX.${t}.${lim ? 'L' : 'nl'}`])}</td></tr>`;
const tot = L => { const s = LAWS.filter(x => x.list === L); return { n: s.length, y: s.filter(x => x.notation).length } };
h += `<tr><td>all</td><td class="num">${f(tot('NTN'))}</td><td class="num">${f(tot('NTX'))}</td></tr>`;
$('cross').innerHTML = h;
const share = (L, t, lim) => c[`${L}.${t}.${lim ? 'L' : 'nl'}`].n / tot(L).n;
const dn = L => share(L, 'D', false);
// the paper's per-cell rates on the standard list's mix, and only its directions-without-a-limit rate
const rate = k => c[k].n ? c[k].y / c[k].n : 0;
const keys = ['D.nl', 'D.L', 'A.nl', 'A.L'];
const pred = keys.reduce((s, k) => s + rate('NTN.' + k) * c['NTX.' + k].n, 0);
const predD = rate('NTN.D.nl') * c['NTX.D.nl'].n;
$('mix').textContent = `laws among directions without a limit: ${Math.round(100 * dn('NTN'))}% of the paper's list, ` +
`${Math.round(100 * dn('NTX'))}% of the standard list\n` +
`the paper's rates on the standard list's mix: ${pred.toFixed(1)} notation expected, ${tot('NTX').y} found ` +
`(the paper's 3 of 7 for amounts without a limit is the part that does not carry over)\n` +
`its directions-without-a-limit rate alone: ${predD.toFixed(1)} expected in that cell, ${c['NTX.D.nl'].y} found`;
}
function sync() { draw1(); draw2(); drawTiles(); drawCross() }
// controls and links
for (const s of SLOPES) { const o = document.createElement('option'); o.value = o.textContent = s; $('sp').appendChild(o) }
const q = new URLSearchParams(location.search);
if (q.get('s') && /^\d+(\/\d+)?$/.test(q.get('s'))) { st.s = q.get('s'); if (!SLOPES.includes(st.s)) { const o = document.createElement('option'); o.value = o.textContent = st.s; $('sp').appendChild(o) } }
if (q.get('n')) st.n = Math.max(1, Math.min(12, +q.get('n') | 0));
if (q.get('k')) st.k = Math.max(1, Math.min(60, +q.get('k') | 0));
if (GROUPS.hasOwnProperty(q.get('group'))) st.group = q.get('group');
if (q.get('law') && LAWS.some(x => x.id === q.get('law'))) st.law = q.get('law');
$('sp').value = st.s; $('nn').value = st.n; $('kk').value = st.k;
$('sp').onchange = e => { st.s = e.target.value; draw1() };
$('nn').oninput = e => { st.n = +e.target.value; draw1() };
$('kk').oninput = e => { st.k = +e.target.value; draw2() };
sync();
window.__notation = {
laws: () => LAWS.map(x => ({ ...x })),
counts: () => { const c = {}; for (const L of ['NTN', 'NTX']) { const s = LAWS.filter(x => x.list === L); c[L] = { n: s.length, notation: s.filter(x => x.notation).length } } return c },
cross, groupsOf: by => groupsOf(by).map(g => ({ name: g.name, n: g.laws.length, notation: g.laws.filter(x => x.notation).length })),
turns: (s, n) => { const z = turns(parseFrac(s), n); return { re: str(z.re), im: str(z.im) } },
back: (s, n) => { const z = back(parseFrac(s), n); return { re: str(z.re), im: str(z.im) } },
leibniz: k => str(leibniz(k)), wallis: k => str(wallis(k)),
set: o => { Object.assign(st, o); $('sp').value = st.s; $('nn').value = st.n; $('kk').value = st.k; sync() },
state: () => ({ ...st }),
};
</script>
</body>
</html>