CultMath 0.4.1: version, changelog (BoundedLeastSquares stopping fix, Validate), cultlib dependency pin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-11 04:31:21 +02:00
commit 61c2d76de6
4 changed files with 35 additions and 3 deletions

View file

@ -10,7 +10,7 @@
<PackageId>GameCult.Math</PackageId>
<!-- MIT overall; math.Phacelle.cs and CultPhasor.cs (and the two Phacelle HLSL files) are MPL-2.0. -->
<PackageLicenseExpression>MIT AND MPL-2.0</PackageLicenseExpression>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<Description>Clean-room C# math shaped for HLSL-style renderer code.</Description>
<Authors>GameCult</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>

View file

@ -5,6 +5,38 @@ All notable changes to this package are documented in this file.
Earlier releases (0.2.0-0.2.3) predate this package's changelog and are not
backfilled here; see `docs/semver-policy.md` for why.
## [0.4.1]
### Fixed
- `BoundedLeastSquares.Solve` no longer reports `Converged` right after releasing
a bound while another bound still violates the KKT conditions by more than the
tolerance. Before, the cost-progress rule judged the pass that followed a
release, and near a minimiser a cost difference resolves only about the square
root of what a gradient comparison resolves, so the solve could stop with a
bound's gradient ten thousand times the tolerance. Now a bound is released
only when its violation exceeds both the tolerance and the rounding bound of
its double gradient, and the cost-progress rule judges only passes that
release nothing; a release resets the progress mark. Measured case: an
allocator-shaped problem (15 rows, 12 columns) solved from `x = 0` at
tolerance 1e-12 returned `Converged` with one throttle at 1, and re-solving
from that answer moved it to 0.92221445, so the answer depended on the start by
0.078. It now stops at 0.92221445 and the re-solve takes 0 iterations
(`TheStopAfterAReleaseIsOnTheGradientNotTheCost` at 1e-12 and 1e-9, and for
every column position of the released bound,
`TheStopAfterAReleaseIsOnTheGradientWhicheverColumnWasReleased`). At the
default tolerance the results of the existing tests are unchanged. Results
move only where the old solver stopped early; a caller that compared such a
result against a stored value sees the corrected one.
### Added
- `BoundedLeastSquares.Validate(m, n, a, b, lo, hi, kktRelativeTolerance)` and
the enum `BoundedLeastSquaresInput` (`Valid`, `InvalidTolerance`,
`InvalidBounds`, `NonFiniteMatrix`, `NonFiniteTarget`): names the first input
that breaks the contract, in that order. `Solve` calls it, so it returns
`InvalidInput` exactly when `Validate` returns anything but `Valid`.
## [0.4.0]
### Breaking

View file

@ -1,7 +1,7 @@
{
"name": "org.gamecult.cultmath",
"displayName": "CultMath",
"version": "0.4.0",
"version": "0.4.1",
"unity": "2021.3",
"description": "Precompiled CultMath numeric primitives and matching HLSL semantics for GameCult Unity runtimes.",
"license": "MIT AND MPL-2.0",

View file

@ -4,7 +4,7 @@
"version": "1.0.60",
"unity": "2021.3",
"dependencies": {
"org.gamecult.cultmath": "0.4.0"
"org.gamecult.cultmath": "0.4.1"
},
"description": "CultCache, CultNet, and CultMesh managed runtime assemblies for Unity.",
"license": "MIT",