Skip to content

Commit 8768cbb

Browse files
authored
Move guidance to note and allow for errors in approximation (#303)
1 parent 52905bf commit 8768cbb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/extensions/linear_algebra_functions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,14 @@ The purpose of this function is to calculate the determinant more accurately whe
459459
- first element must have the field name `sign` and must be an array containing a number representing the sign of the determinant for each square matrix.
460460
- second element must have the field name `logabsdet` and must be an array containing the determinant for each square matrix.
461461

462-
For a real matrix, the sign of the determinant must be either `1`, `0`, or `-1`. If a determinant is zero, then the corresponding `sign` must be `0` and `logabsdet` must be `-infinity`. In all cases, the determinant must be equal to `sign * exp(logsabsdet)`.
462+
For a real matrix, the sign of the determinant must be either `1`, `0`, or `-1`.
463463

464464
Each returned array must have shape `shape(x)[:-2]` and a floating-point data type determined by {ref}`type-promotion`.
465465

466+
```{note}
467+
If a determinant is zero, then the corresponding `sign` should be `0` and `logabsdet` should be `-infinity`; however, depending on the underlying algorithm, the returned result may differ. In all cases, the determinant should be equal to `sign * exp(logsabsdet)` (although, again, the result may be subject to numerical precision errors).
468+
```
469+
466470
(function-linalg-solve)=
467471
### linalg.solve(x1, x2, /)
468472

0 commit comments

Comments
 (0)