Skip to content

Latest commit

 

History

History
340 lines (202 loc) · 14.3 KB

File metadata and controls

340 lines (202 loc) · 14.3 KB

Numeric data structures and algorithms

Table of contents


Introduction and overview

🔗

🎥


Floating-point arithmetic

Floating-point arithmetic is arithmetic in which real numbers are represented approximately to a fixed number of significant digits and scaled using an exponent in some fixed base: r = significand × baseexponent. The relative error due to rounding is uniform, i.e. it is independent of the magnitude of the number. The binary-based floating-point system has the smallest possible wobble (a range of relative errors).

🔗

📖

📄

IEEE 754

IEEE 754 is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). If two (non-extended) floating-point numbers in the same format are ordered, then they are ordered the same way when their bits are reinterpreted as sign-magnitude integers. NaNs are endowed with a field of bits into which software can record, say, how and/or where the NaN came into existence; no software exists now to exploit this feature.

🔗

📄

📖

🎥

Denormal numbers

🔗

🎥

NaNs

🔗

🎥

Applications

🔗

History

🔗


Arithmetic algorithms

🔗

Common functions

📖

Powers and logarithms

🔗

Square root

🔗

Inverse square root

🔗

Greatest common divisor (GCD)

Euclidean algorithm

🔗

Binary Euclidean algorithm (Stein’s algorithm)

🔗

Interpolation

🔗

  • J.Bloch. [Extra, Extra – Read all about it: Nearly all binary searches and mergesorts are broken] – Google AI blog (2006)

Arithmetic means

To compute the arithmetic mean μ = 1 / N ∑ xi in a numerically stable way, the following recurrence relation can be used: μN = μN - 1 + 1 / N (xN - μN - 1).

🔗

Binomial coefficient

🔗

Division algorithms

Integer division

🔗

Horner’s method

Horner’s method is a polynomial evaluation method expressed by p(x) = a0 + a1 x + a2 x2 + ... + aN xN = a0 + x (a1 + x (a2 + ... + x (aN) ... )).

🔗

Kahan summation algorithm

🔗


Prime numbers


Linear equations solution algorithms

Iterative methods

🔗

📖

Jacobi method

A recurrence relation: xK+1 = D-1 (D - A) xK + D-1 b, where the preconditioner D is the diagonal part of A: D = diag(A).

🔗

🎥


Matrix diagonalization

Jacobi eigenvalue algorithm

🔗

📖


Wavelets

🎥

📖


Applications

Finite elements and finite volume methods

🎥