[genius] Wed Mar 26 18:44:53 2014 Jiri (George) Lebl <jirka 5z com>



commit 6c1db2b81107af421ef4710d24bc803737dead83
Author: Jiri (George) Lebl <jiri lebl gmail com>
Date:   Wed Mar 26 18:44:56 2014 -0500

    Wed Mar 26 18:44:53 2014  Jiri (George) Lebl <jirka 5z com>
    
        * lib/linear_algebra/linear_algebra.gel: Fix IsInvertibleField,
          would return false negatives

 ChangeLog                             |    5 +++++
 lib/linear_algebra/linear_algebra.gel |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a7dae1e..4b833a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 26 18:44:53 2014  Jiri (George) Lebl <jirka 5z com>
+
+       * lib/linear_algebra/linear_algebra.gel: Fix IsInvertibleField,
+         would return false negatives
+
 Mon Mar 17 22:31:01 2014  Jiri (George) Lebl <jirka 5z com>
 
        * src/calc.[ch], src/funclib.c: Implement DisplayVariables which
diff --git a/lib/linear_algebra/linear_algebra.gel b/lib/linear_algebra/linear_algebra.gel
index 85d732f..6ad3d4a 100644
--- a/lib/linear_algebra/linear_algebra.gel
+++ b/lib/linear_algebra/linear_algebra.gel
@@ -176,7 +176,7 @@ function IsInvertibleField(n) =
 (
   if IsNull (n) then return false
  else if (IsValue(n)) then return (n!=0)    # Elements of fields (Q,R,C) are invertible iff != 0
- else if (IsMatrix(n)) then (if IsMatrixSquare(n) then return (IsInvertible(det(n))) else return true);
+ else if (IsMatrix(n)) then (if IsMatrixSquare(n) then return (IsInvertibleField(det(n))) else return true);
                                              # Matrices are invertible iff they are square and their
                                              #  determinant is a unit
  error ("IsInvertibleField: argument not a value or matrix");bailout


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]