feat: initial release
Release / gates (push) Successful in 4m38s
Test / test (push) Successful in 5m16s
Release / release (push) Successful in 35s

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-03 10:00:00 +02:00
commit af4ee19703
617 changed files with 191195 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
// SPDX-License-Identifier: MIT
package linalg
import (
"math"
"testing"
)
// TestDetFactorsThroughParallelDispatch drives base.Factor's rank-1
// update dispatch through the public Det entry: a 200 by 200 upper
// triangular matrix keeps every pivot on the diagonal, and the first
// pivot's update spans 199 rows times 200 columns, past the dispatch
// quantum, so the crewed path runs rather than the inline one. No row
// changes under the elimination, since the multiplier of every row is
// zero, so the determinant is exactly 2 to the 200th, which float64
// holds as an exact power of two.
func TestDetFactorsThroughParallelDispatch(t *testing.T) {
const n = 200
vals := make([]float64, n*n)
for i := range n {
for j := i; j < n; j++ {
vals[i*n+j] = 2
}
}
d, err := Det(mustFloats(t, vals, n, n))
if err != nil {
t.Fatalf("Det: %v", err)
}
if want := math.Ldexp(1, 200); d != want {
t.Fatalf("Det = %v, want exactly %v", d, want)
}
}