From 15730d4e995ae323fe8bf84a691855cafe359b5b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 15 Oct 2026 23:13:30 +0200 Subject: [PATCH] cultmath: span tests: the float arm of the near-zero midpoint test carries the accumulation bound of its octave reads; previous commit's new test failed on 7e-9 of float noise (builds, one new test red) Co-Authored-By: Claude Sonnet 5.5 --- packages/cultmath/tests/CultMath.Tests/SpanStageTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cultmath/tests/CultMath.Tests/SpanStageTests.cs b/packages/cultmath/tests/CultMath.Tests/SpanStageTests.cs index 684e7789..a7ed48b3 100644 --- a/packages/cultmath/tests/CultMath.Tests/SpanStageTests.cs +++ b/packages/cultmath/tests/CultMath.Tests/SpanStageTests.cs @@ -704,10 +704,10 @@ public sealed class SpanStageTests var speed = loose ? 4.0f * (abs(q.x) + abs(q.y) + abs(q.z) + 20.0f) : 0.0f; var span = new Span(new SpanPath { midpoint = q, velocity = None, speed = speed, acceleration = 0.0f, halfLength = loose ? 1.0f : 0.0f }, None); var fold = stage.Ridged(span.Path).fold; - var (departureFloat, departureExact, _) = BranchDeparture(stage, span, 2); + var (departureFloat, departureExact, rounding) = BranchDeparture(stage, span, 2); Assert.Equal(0.0f, stage.Fbm(span.Path).fold); Assert.True(departureExact <= fold * (1.0 + 1.0e-3) + 1.0e-9, $"midpoint {q}, speed {speed:R}: the exact branch departure is {departureExact:R}, above fold {fold:R}"); - Assert.True(departureFloat <= fold * (1.0 + 1.0e-3) + 1.0e-9, $"midpoint {q}, speed {speed:R}: the float branch departure is {departureFloat:R}, above fold {fold:R}"); + Assert.True(departureFloat <= fold * (1.0 + 1.0e-3) + 1.0e-9 + rounding, $"midpoint {q}, speed {speed:R}: the float branch departure is {departureFloat:R}, above fold {fold:R}"); if (departureExact > 0.0) crossing++; }