NLA-lib Explorer

Mathematical samplers from the actual Ops scalar operations

Library · Source module

Mathematical samplers from the actual Ops scalar operations

The uniform sampler multiplies the stored scale by a rounded real seed. The Gaussian sampler multiplies each rounded real Gaussian word by the stored square root of one half. An ideal standard complex Gaussian already contains division by the exact square root of two, so its real and imaginary parts are rescaled before the real-word rounding is applied.

These are mathematical functions of the same scalar machine as the program, rather than arbitrary sampler parameters assumed to have been implemented. No old program interpretation or scalar semantics is constructed.

Main results

* NLAlib.Ops.Machine.normalSample_div_sqrt_two: the complex sampler equals the executed two-word scaling on its raw real Gaussian words. * NLAlib.Ops.StdModel.isUnifSampler_uniformSample: the uniform accuracy contract follows from scalar multiplication, seed rounding, and multiplication's radius-preservation property. * NLAlib.Ops.StdModel.isNormalSampler_normalSample: relative accuracy of the actual Gaussian normalization and scalar products, independently of the sample law. * NLAlib.Ops.StdModel.isAccurate_toFloatMachine: the combined matrix-machine numerical interface, including explicit multiplication and QR accuracy assumptions. * NLAlib.Ops.StdModel.specNorm_perturbWords_sub_le: the rounding of a Gaussian perturbation scaled by \gamma/\sqrt N (NLAlib.Ops.Machine.perturbWords).

Declarations