NLA-lib Explorer

A floating-point machine on the grid with unbounded exponent

Library · Source module

A floating-point machine on the grid with unbounded exponent

NLAlib.gridMachine t is a NLAlib.FloatMachine on stored reals that decodes a word by rounding it to nearest onto the t-bit grid with unbounded exponent (Real.roundNearest t), as NLAlib.Computation.gridSem does, and rounds every result to that grid: the scalar operations round the exact result on the decoded operands, the uniform sampler clamps the rounded \bar s \mathbf{v} to [-\bar s, \bar s], the normal sampler rounds both parts, and the two black boxes NLAlib.gridMM t, NLAlib.gridQR t compute the exact product (an exact QR factorization, chosen) of the decoded inputs and round each entry, real and imaginary parts separately, with the odd rounding NLAlib.gridRoundOdd (so that the rounded \mathbf{A}\mathbf{A}^{\mathsf{H}} is exactly Hermitian: Real.roundNearest rounds ties upward and is not odd). It satisfies the contract NLAlib.FloatMachine.IsAccurate at the decoding Real.roundNearest t, with u = 2^{-t}, floor \tau = 0, every range \Omega, \mu_{\mathrm{MM}}(d) = \mu_{\mathrm{QR}}(d) = 2d and c_{\mathrm{N}} = \sqrt2, for t \ge 1: the companion, on the decoding of the grid semantics, of NLAlib.binaryFloatMachine (bounded exponent, floor \tau > 0), which cannot satisfy a contract at floor 0.

The file also gives a part of a rounded witness on the grid: rounding the tape meets NLAlib.Computation.IsTapeRounding with countable range and measurable fibres (with Real.abs_roundNearest_le_of_mem_floatGrid: rounding to nearest does not leave the modulus of a grid point).

Main definitions

* NLAlib.gridRoundOdd: odd rounding to nearest onto the grid. * NLAlib.gridMM, NLAlib.gridQR: the correctly rounded black boxes on stored pairs. * NLAlib.gridMachine: the machine.

Main results

* NLAlib.isMatMulErr_gridMM, NLAlib.isQRErr_gridQR, NLAlib.isAccurate_gridMachine: the contracts. * NLAlib.isTapeRounding_roundNearest, NLAlib.measurable_roundNearest: rounding the tape.

Declarations