Numerics and floating point

The part of the course that is the reason many readers are here. The IEEE modules expose the flags and the rounding mode, and ieee_value produces the NaN and the infinity that spread through a calculation. Comparing two reals takes a tolerance, and the random numbers take a seed. The rest is numerical method: integration, root finding, a linear system solved by elimination, a statistics module, and a report the method writes.

089 The IEEE modules IEEE_ARITHMETIC, IEEE_EXCEPTIONS, IEEE_FEATURES, the flags and the rounding mode Open 090 NaN, infinity and IEEE values ieee_value, ieee_is_nan, ieee_is_finite, a NaN that spreads, and a comparison with it Open 091 Comparing floating-point numbers equality of reals, an absolute and a relative tolerance, epsilon and a test that passes Open 092 Random numbers and seeding RANDOM_SEED, RANDOM_NUMBER, a seed from the clock, and the same sequence twice Open 093 Numerical integration a trapezoid rule, Simpson's rule, the error that falls with n, and a measured convergence Open 094 Root finding: bisection and Newton bisection, its convergence, Newton and the derivative, and a tolerance loop Open 095 Linear systems by hand Gaussian elimination with partial pivoting, back substitution, and a residual check Open 096 A statistics module mean, variance, standard deviation and a least-squares line in a module with a test Open 097 A numerical report with a table a formatted table of results, alignment with the edit descriptors, and a header that repeats Open

Lessons