You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: harden exact arithmetic and benchmark publication
- add `DeterminantWithErrorBound` for paired determinant estimates and certified bounds
- scale exact systems independently and round exact values directly to IEEE-754
- fail benchmark publication closed on invalid samples or mismatched provenance
- make release and changelog tooling transactional, path-safe, and Windows-portable
- align benchmark CI with pinned local tools and least-privilege publishing
@@ -328,26 +328,25 @@ filter and uses fraction-free Bareiss elimination in `BigInt`.
328
328
Because `Matrix` stores only finite entries, arithmetic range failures in the
329
329
filter are inconclusive rather than errors and the exact fallback is total.
330
330
331
-
### Adaptive precision with `det_errbound()`
331
+
### Adaptive precision with `det_direct_with_errbound()`
332
332
333
-
`det_errbound()` returns the conservative absolute error bound used by the fast
334
-
filter when the relative-error analysis is valid. It returns `None` when a
335
-
D ≤ 4 computation may be affected by gradual underflow, as well as for
336
-
unsupported D ≥ 5 dimensions. This method does NOT require the `exact` feature
337
-
— it uses pure f64 arithmetic and is available by default. This enables
338
-
building custom adaptive-precision logic for geometric predicates:
333
+
`det_direct_with_errbound()` returns a closed-form determinant together with
334
+
the conservative absolute error bound used by the fast filter, computed from
335
+
one shared traversal. It returns `None` when a D ≤ 4 computation may be
336
+
affected by gradual underflow, as well as for unsupported D ≥ 5 dimensions.
337
+
This method does NOT require the `exact` feature — it uses pure f64 arithmetic
338
+
and is available by default. Use `det_errbound()` when only the bound is needed.
339
+
The paired API enables custom adaptive-precision logic for geometric predicates:
339
340
340
341
```rust,ignore
341
342
use la_stack::prelude::*;
342
343
343
344
fn adaptive_det_sign<const D: usize>(
344
345
matrix: &Matrix<D>,
345
346
) -> DeterminantSign {
346
-
if let (Ok(Some(bound)), Ok(Some(det))) =
347
-
(matrix.det_errbound(), matrix.det_direct())
348
-
{
349
-
if det.abs() > bound {
350
-
return if det > 0.0 {
347
+
if let Ok(Some(estimate)) = matrix.det_direct_with_errbound() {
348
+
if estimate.determinant().abs() > estimate.absolute_error_bound() {
349
+
return if estimate.determinant() > 0.0 {
351
350
DeterminantSign::Positive
352
351
} else {
353
352
DeterminantSign::Negative
@@ -422,6 +421,7 @@ out of the common prelude.
422
421
|---|---|---|---|
423
422
|`Vector<D>`|`[f64; D]`| Finite fixed-length vector for input and computation |`try_new`, `as_array`, `into_array`, `dot`, `norm2_sq`|
424
423
|`Matrix<D>`|`[[f64; D]; D]`| Finite square matrix for input and computation | See below |
424
+
|`DeterminantWithErrorBound`| two private `f64` fields | Paired direct determinant and certified absolute bound |`determinant`, `absolute_error_bound`|
425
425
|`Lu<D>`|`Matrix<D>` + pivot array | Factorization for solves/det |`solve`, `det`|
426
426
|`Ldlt<D>`|`Matrix<D>`| Factorization for symmetric SPD/PSD solves/det |`solve`, `det`|
0 commit comments