16 lines
287 B
Markdown
16 lines
287 B
Markdown
# Arithmetic
|
|
Reset after
|
|
$$r' = r + c$$
|
|
# Geometric
|
|
Reset after
|
|
$$r' = r * q$$
|
|
# LUBY / Reluctant Doubling
|
|
|
|
```
|
|
// Where v is the actually intereting part
|
|
(u,v) = (1,1)
|
|
(u', v') = (u & -u == v ? (u + 1, 1) : (u + 2v))
|
|
//Doubles every so often
|
|
/ Series: 1 1 2 1 1 2 4 1 1 2 4 8 ...
|
|
```
|