Commit graph CultLib/packages/cultmath/tests
Author SHA1 Message Date
Meta Vens
d605c70bba CultPhasor.cos/.sin become .cosine/.sine in C# and HLSL (GLSL regenerated next)
SPIRV-Cross renames members matching GLSL builtins, so the source names change. Resolver and JSON writer accessors follow the members; the wire (positional MessagePack, JSON keys) is untouched in this commit. The committed GLSL is stale until its regeneration commit, so CommittedGlslEqualsLowering fails here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:25:39 +02:00
Meta Vens
8a0b98f70f CultMath: re-record the fixture and lavapipe bounds on Yggdrasil after the exit-bound draws; the mutant test prints its kill counts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:48:54 +02:00
Meta Vens
ce6e39a282 SiteArrays: ExitBoundPoints, lattice draws where an exit one ring early reads another result
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:46:17 +02:00
Meta Vens
70914d9a95 CultMath: the fixture cases separate each lattice-loop mutant from the shader text
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:30:19 +02:00
Meta Vens
773a3efbc9 CultMath: regenerate the GLSL and re-record the lavapipe bounds on Yggdrasil for the site-array families
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:26:03 +02:00
Meta Vens
96d83c7f1b CultMath: regenerate CultMath.glsl and glsl-parity.json on Yggdrasil (Ubuntu) for the site-array families
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:21:45 +02:00
Meta Vens
8f74369dee SiteArrays: WidestLook initialises before FarPoints
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:18:56 +02:00
Meta Vens
150ea0a060 CultMath shaders: cultmath_power_border, cultmath_lattice_cell_distance and cultmath_weighted_lattice_cells over a fixed-capacity site array
CULTMATH_MAX_SITES defaults to 128 under #ifndef. The consumer-written ring-loop and border-loop comment recipes are deleted. The C# mirror takes the array as T[]; the span twins live in SiteArrays; the GLSL lowering keeps the capacity macro; gen.py learns the array leaf; the smooth-step family gains its cap-point draw; CULTMATH_WRITE_GLSL refuses non-Linux.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:09:18 +02:00
Meta Vens
7ddb10408e cultmath tests: lavapipe bounds with the four lattice families, recorded on Yggdrasil (cut lattice-weighted-shaders)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 11:34:05 +02:00
Meta Vens
8b31e47eee CultMath shaders: HLSL twins of the four lattice steps, both copies, regenerated GLSL and parity fixture (cut lattice-weighted-shaders)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 11:31:46 +02:00
Meta Vens
20ecec4040 cultmath tests: lattice refuses a query whose far cell centres overflow, as p
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:22:10 +02:00
Meta Vens
df1b2dca89 cultmath tests: lattice cap reached by a point that needs ring 17, exact tie keeps the earlier row-major cell, winner swaps are continuous
Findings max-ring-unpinned and the tie-le survivor; also the spec's F1-swap and F2 continuity checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 09:14:39 +02:00
Meta Vens
5745c2c3b2 cultmath lattice: stretch normal normalised by its largest component; refusals name their own parameter
Findings normal-not-unit-breaks-exit and refusals-misnamed: a tiny or huge normal acts as its direction, cellSize and the body span are refused under their own names, and a drift times time product that overflows is refused up front.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 09:14:30 +02:00
Meta Vens
c65f70e3cd cultmath tests: lattice stretch normal is normalised 2026-10-17 07:45:43 +02:00
Meta Vens
1a8b04f36f cultmath docs: weighted lattice cells section and README bullet; rings pinned to their measurement 2026-10-17 07:29:51 +02:00
Meta Vens
e835745e63 cultmath tests: lattice orbit slow enough for the 60 Hz weight bound 2026-10-17 07:27:09 +02:00
Meta Vens
202a0bd41f cultmath tests: lattice orbit speed, boost-0 look for the 0.5k bound 2026-10-17 07:22:59 +02:00
Meta Vens
ae0c871b8f cultmath tests: lattice cells oracle, exit-bound mutants, smooth band, continuity, refusals, rings, probe parity 2026-10-17 07:18:51 +02:00
Meta Vens
911fc75531 cultmath tests: re-record lavapipe bounds for trophic-nodes families (follow-up trophic-families-rerecord)
Ten new families per route; no existing row changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 23:38:05 +02:00
Meta Vens
28c9005b61 cultmath tests: the tripwire states that a qualifier between // x /* and // */ passes (finding s2.tripwire-slashslash-star-hides)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 23:34:30 +02:00
Meta Vens
4bf6e6750c Merge hands/cultmath-shader-conforming-run (verdicts s1, s2) 2026-10-16 23:33:53 +02:00
Meta Vens
84589e0c05 cultmath tests: a reference value moved by one ulp fails its sampled-form family through the recorded bits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:19:28 +02:00
Meta Vens
352bf5b27e cultmath tests: the device-tolerance pin uses fixture values in [1, 1.1), where k ulps is within a tenth of k u1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:57:54 +02:00
Meta Vens
3ad421c482 cultmath tests: the stated device tolerance is pinned at its limit in ulps of the fixture's magnitude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:46:56 +02:00
Meta Vens
632ffd1f7b cultmath: re-record lavapipe bounds with result sha256 per family and route, and phacelle's device clause
Recorded by run-lavapipe.sh WRITE_BOUNDS=1 on Yggdrasil; the repeat run in the same job judged the file green and
produced the same all-outputs hash (46e0c8e0...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:46:13 +02:00
Meta Vens
87299d2f02 cultmath tests: the precision tripwire reads vector and matrix spellings of min10float, min16float and half
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:33:12 +02:00
Meta Vens
7e6881af9b Merge hands/cultmath-trophic-nodes
Verdicts s1, s2 and s3 of cut trophic-nodes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 21:23:11 +02:00
Meta Vens
9a3ad78c11 cultmath: lavapipe bounds carry exact result bits, a reduced-precision tripwire, and the judge reads the stated device tolerance
Per verdict s1: the judge keeps the fixture tolerance as correctness and adds a recorded sha256 of each family's
result per route (a change in the computation fails until re-recorded); a test refuses mediump/lowp/precision
other than highp and min16float/min10float/min16int/half in the committed shaders; phacelle's tolerance text states
a device clause (2^-18) that the judge parses and enforces. The committed bounds file lacks the new column until
the next WRITE_BOUNDS=1 job, so this commit's device run fails and it does not pass DeviceResultsHoldFixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:22:14 +02:00
Meta Vens
e151b1b4e0 CultMath GLSL: regenerated lowering and parity fixture (float2 segment overloads, close-site border step samples)
Only the trophic families after the inserted segment families change; every family before them is identical.
Builds; the parent commit does not pass CommittedGlslEqualsLowering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:09:57 +02:00
Meta Vens
16657fa20f CultMath shaders: restore the float2 segment overloads, sample close distinct sites, document the border step's owner contract
Shader overloads stay native (ruling shader-overloads-stay-native): cultmath_segment_closest and
cultmath_distance_to_segment have float2 and float3 forms again, with mirror asserts and fixture families.
The rejected "avoid overloads" comment and design text are gone. The border step's outside-cell behaviour
(distance 0 with that plane's normal) is documented in C# and the HLSL header and pinned by a test; the mirror
and fixture gain distinct sites closer than 1e-2. GLSL and fixture regenerate in the next commit; this one does
not pass CommittedGlslEqualsLowering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:01:16 +02:00
Meta Vens
ea7e665e6c cultmath: judge tests kill the survivors of the first mutant table (exact by one case, bound excess, infinity class, fBm reference, row identity)
Not yet built.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 20:25:02 +02:00
Meta Vens
72c0358f0f cultmath: recorded lavapipe device bounds (llvmpipe, mesa 25.2.8, dxc 1.9.2607) from run-lavapipe.sh WRITE_BOUNDS=1
Re-record needed when trophic-nodes merges (new families).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 20:04:36 +02:00
Meta Vens
37bc6de8b1 cultmath: lavapipe shader generator, Vulkan host and job script
tools/device/gen.py spells one HLSL and one GLSL ES 3.10 compute shader per work
item, vkrun.c dispatches it on the first Vulkan device, run-lavapipe.sh runs the
whole conforming job. None of them compares. Also fixes the metric test's family
choice. Not yet run: these may not build or run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 19:59:42 +02:00
Meta Vens
4342fb692f cultmath: C# work list and device judge for the lavapipe conforming run
GlslMirrorTests becomes partial; GlslMirrorTests.Device.cs holds WriteDeviceWork
(the work list, with reference families for the four sampled-form families) and
DeviceResultsHoldFixture (exact, check, sampled-form and recorded-bound judging),
plus simulated-device tests for each rule. Not yet built or run: this commit may
not build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 19:41:14 +02:00
Meta Vens
fcd580a8ed SiteCellsTests: the 2^24 span refusal is tested on a real overlong span, so a doubled limit fails it
The earlier version read past a one-element array and passed under the mutant by hitting a non-finite site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:36:01 +02:00
Meta Vens
ddd9e63586 SiteCellsTests: power_border_step ignores a site coincident with the owner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:29:32 +02:00
Meta Vens
189677c63d CultMath GLSL: regenerated lowering and parity fixture (power_border_step, segment_closest 3D; 2D segment families removed)
Earlier families unchanged (checked by JSON comparison against f697e03f). Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:25:41 +02:00
Meta Vens
bcd8a58055 CultMath sites: exact power cell border (radical planes, midpoint form), validated cell spans, one shader name per segment function
power_border_step/power_border give the exact distance to the owner's power cell boundary: the least radical-plane
distance over every other site, built from the offset and (w1-w2)(w1+w2) so it does not cancel. site_cells_border is
documented as the two-winner bisector distance. Cell spans refuse non-finite positions, queries and spans over 2^24.
segment_closest is public in C#; the HLSL segment functions are 3D only (no new overload sets). Tests added.
Does not build the GLSL checks: CultMath.glsl and glsl-parity.json are regenerated in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:15:55 +02:00
Meta Vens
ee8b15ec2c SiteCellsTests: the 2D segment distance is checked against a double reference, not only against the out form
The closest-unclamped-2d mutant survived because both forms share one segment_closest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 18:34:55 +02:00
Meta Vens
955126697b CultMath GLSL: regenerated lowering and parity fixture for the site-cell twins
Regenerated with CULTMATH_WRITE_GLSL=1 on Yggdrasil; the fixture adds seven families and deletes no line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 18:26:43 +02:00
Meta Vens
a1aac7c495 CultMath tests: GLSL mirror families for the site cells, scores, border, Gabriel margin and segment distance
CommittedGlslEqualsLowering and GoldenFixtureMatchesCSharp fail at this commit until the next one regenerates the GLSL and the fixture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 18:21:50 +02:00
Meta Vens
e584bfaff2 CultMath HLSL: site cells, scores, border, Gabriel margin and segment distance twins (both copies, mirror asserts)
CommittedGlslEqualsLowering fails at this commit until the GLSL is regenerated in the next one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 18:17:40 +02:00
Meta Vens
a3c3bd9695 CultMath: site cells (power and multiplicative scores, fold, border), Gabriel margin and gate, out-free distance_to_segment
Not yet verified on Yggdrasil; this commit builds only if the next run says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 18:14:50 +02:00
Meta Vens
658c09ecd3 CultMath tests: LOD-far depth agreement asserted under the headline's 2x contract
Pins LodStep's footprint branch, which only bites at LOD-far.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 17:17:01 +02:00
Meta Vens
58a2d50a76 cultmath: one owner of the snoise read's absolute terms (SNOISE_READ_VALUE, SNOISE_READ_GRADIENT)
span_slack and af_snoise each spelled 2^-14 (value) and 2^-12 (gradient) inline, in C# and
HLSL. Both now read the constants beside SNOISE_HESSIAN (math.Affine.cs, CultMath.Affine.hlsl,
Unity copies), so a device-judged widening moves every reader. Bits unchanged. The test
oracles in AffineTests and GlslMirrorTests read the constants; a new test pins af_snoise's
allowance to span_slack's terms. span_slack's comment no longer claims it is the only
allowance. Does not build green yet: CultMath.glsl is not regenerated in this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 06:34:21 +02:00
Meta Vens
4de26d8655 cultmath tests: the mirror twin count is 127 (span_rounding and span_slack twins)
EveryMirrorFunctionMatchesCSharpMath compared both new twins bit for bit against the C# seam;
only its pinned count of mirrored functions moves from 125 to 127. Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 05:00:37 +02:00
Meta Vens
369e5793a7 cultmath: regenerate CultMath.glsl and glsl-parity.json (four band families appended)
Generated by CULTMATH_WRITE_GLSL=1 on Yggdrasil (dotnet/sdk:10.0) at 5ccbb094; the fixture
diff is additions only, every earlier family byte-identical. Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 04:51:34 +02:00
Meta Vens
5ccbb09487 cultmath tests: band read families with an allowance check, a reach test, GradDouble
Four coordinate-band snoise_grad / snoise_hessian families with Verify AssertSpanAllowance,
SpanAllowanceCoversReadsAlongTheSpan, NoiseBoundTests.GradDouble and its pin, design.md
paragraph. The fixture and CultMath.glsl are regenerated in the next commit; this one compiles.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 04:49:13 +02:00
Meta Vens
338a952be0 cultmath: near-origin fold test checks the exact departure to 1e-13
The additive 1e-9 absorbed the whole exact departure at scales 1e-4 and 1e-2 (1e-11 to 1e-9),
so dropping the value allowance's absolute term 2^-14 survived the test. The tolerance is 1e-13.
Test only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:11:04 +02:00
Meta Vens
d172e7f71f cultmath: regenerate CultMath.glsl and glsl-parity.json for the span stage twins (CULTMATH_WRITE_GLSL=1, Yggdrasil)
CultMath.glsl gains the three structs and cultmath_span_stage/fbm/ridged by the lowering; the fixture
gains the two span families after the last one, earlier families byte-identical (0 deleted lines).
Builds; CultMath.Tests 452 passed at this tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:02:12 +02:00