---
title: "mlab-numerics-bench-sampling — Mova code model"
description: "Mova code model of mlab/bench/src/main.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/mlab/bench/src/main.rs.groupant/bench-sampling.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/mlab/bench/src/main.rs.groupant/bench-sampling.groupant/>

# mlab-numerics-bench-sampling

The groupant beside mlab/bench/src/main.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`mlab/bench/src/main.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/bench/src/main.rs)
- **source SHA-256:** `78398060b7ccba1c…`
- **covers:** Lcg::next wrapping-updates u64 and takes upper53 bits; data consumes n² samples; best measures3 callbacks and keeps min duration while overwriting acc each call. (bytes 486–1139)
- **part of:** [mlab-numerics-bench](https://md.groupants.elamur.ai/free/en/mova/mlab/bench/src/main.rs.groupant/)
- **repository folder:** [`mlab/bench/src/main.rs.groupant/bench-sampling.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/bench/src/main.rs.groupant/bench-sampling.groupant)
- **repository commit:** `855da7bd4a7b`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `zero_data` | zero_data | partial source derived model | [zero_data](#zero-data) |
| `last_value` | last_value | partial source derived model | [last_value](#last-value) |
| `range` | range | partial source derived model | [range](#range) |
| `resource_gap` | resource_gap | partial source derived model | [resource_gap](#resource-gap) |

## Model text


### descriptant

#### mlab-numerics-bench-sampling

Lcg::next wrapping-updates u64 and takes upper53 bits; data consumes n² samples; best measures3 callbacks and keeps min duration while overwriting acc each call.

##### Modeling epoch 2026-10-31

Prospective source reading preceded inline tests. This node records implementation behavior, not a complete MATLAB compatibility contract. Models retain limits discovered in source reading, including real-only projections and warning-only result gates. Synthetic CPU fixtures are independent of frozen suites. No external effects, teacher, corpora or benchmark main are executed.

### approximant

#### Forward relation

Lcg::next wrapping-updates u64 and takes upper53 bits; data consumes n² samples; best measures3 callbacks and keeps min duration while overwriting acc each call.

Executable Rust surrogate gap: no calibrated replacement is attached. Exact test calls are evidence for the reference, not a fast approximant. Numerical approximants would need a named domain, zero convention and metric at supported caps 1/2/5/10%; categorical errors/effects have no percent surrogate here.

### invariant

#### Invariants and cost

u64 wrap and f64 dyadic conversion are defined; duration comparison cannot establish deterministic time.

##### Cost

O(n²) sampling; exactly3 callback calls plus Instant reads.

Allocation failure, unchecked usize dimension arithmetic and IEEE nonfinite propagation are outside finite fixture guarantees. No measured throughput or global accuracy claim.

### models

## Typed source models: mlab-numerics-bench-sampling

### behavior_complement

Callback count cannot be0,1 or2 on normal return. Seed0 first output excludes using old state's bits. Equal seed/n excludes different data.

### reverse_reconstruction

One output loses11 state bits; invertible odd LCG multiplier maps each compatible post-state to a prior seed. best's last result permits arbitrary earlier results and durations consistent with minimum.

### zero_data

n0 produces empty Vec without consuming LCG.

### last_value

best callback count3 returns last accumulator3, independent of timing winner.

### range

top53 integer in[0,2^53) implies output in[-.5,.5).

### resource_gap

n*n uses unchecked usize multiplication; huge dimensions are outside helper domain.


### tests

#### Evidence and limits

Selected wave30_tests exercise this source; fragment-specific limits are stated in its operators.

Native command specifications, numeric exits, profile-paired logs, compiled controls and exact-restoration receipts are retained externally in the wave30 numerics run. Tests exercise actual source, not a copied model. The selected finite fixtures do not prove full convergence, backend accuracy on all matrices, resource exhaustion or side-effectful callback behavior.
