Codex Wiki OurBigBook logoOurBigBook.comSite Source code
arithmetic.bigb
= Arithmetic
{wiki}

Arithmetic studies elementary operations on numbers.

= Real number
{title2=$\mathbb R$}
{parent=Arithmetic}
{wiki}

A real number is an element of the complete ordered field $\mathbb R$.

= Binary expansion
{parent=Real number}
{wiki=Binary_number}

Every real number in $[0,1]$ is a sum $\sum_{j\geq1}\varepsilon_j2^{-j}$ with binary digits $\varepsilon_j\in\{0,1\}$.

= Dyadic rational
{parent=Binary expansion}
{wiki}

A dyadic rational has the form $m/2^k$. Its terminating binary expansion has an alternative expansion ending in infinitely many $1$ digits.

= Addition
{title2=$+$}
{parent=Arithmetic}
{wiki}

Addition combines two numbers or elements of an additive algebraic structure into their sum.

= Additive inverse
{title2=$-x$}
{parent=Addition}
{wiki}

The additive inverse $-x$ satisfies $x+(-x)=0$.

= Sum
{title2=$\sum$}
{parent=Addition}
{wiki=Summation}

A sum combines a finite or infinite sequence of terms by repeated <addition>. The symbol $\sum$ denotes summation over an index.

= Weighted mean
{title2=$\bar x_w$}
{parent=Sum}
{wiki=Weighted_arithmetic_mean}

For positive weights $w_i$, the weighted mean is
$$
\bar x_w=\frac{\sum_iw_ix_i}{\sum_iw_i}.
$$
It lies between the smallest and largest $x_i$; the same result holds for integrals with a positive weight function.

= Prefix sum
{title2=$P_m=\sum_{i=1}^m a_i$}
{parent=Sum}
{wiki}

The prefix sums $P_m=\sum_{i=1}^m a_i$ can all be computed by the recurrence $P_m=P_{m-1}+a_m$ in linear time. Any contiguous sum is then $P_b-P_{a-1}$, so it takes constant time after preprocessing.

= Subtraction
{title2=$-$}
{parent=Arithmetic}
{wiki}

Subtraction adds the <additive inverse>: $a-b=a+(-b)$.

= Multiplication
{title2=$\times$}
{parent=Arithmetic}
{wiki}

Multiplication combines two factors into their product.

= Multiplicative inverse
{title2=$x^{-1}$}
{parent=Multiplication}
{wiki}

A multiplicative inverse of $x$ is an element $x^{-1}$ satisfying $xx^{-1}=x^{-1}x=1$.