octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #52814] some obvious bugs in document Chapter


From: anonymous
Subject: [Octave-bug-tracker] [bug #52814] some obvious bugs in document Chapter 21
Date: Fri, 5 Jan 2018 02:37:34 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?52814>

                 Summary: some obvious bugs in document Chapter 21
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 05 Jan 2018 07:37:33 AM UTC
                Category: Documentation
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Documentation
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Any

    _______________________________________________________

Details:

It looks that there are many bugreports and changesets recently...
I directly put a possible patch here for maintainers convenience:

--- a/doc/interpreter/diagperm.txi
+++ b/doc/interpreter/diagperm.txi
@@ -275,7 +275,7 @@
 then @code{D*M} is equivalent to
 
 @example
-[D(1:n,n) * M; zeros(m-n, columns (M))],
+[D(1:n,:) * M; zeros(m-n, columns (M))],
 @end example
 
 @noindent
@@ -447,7 +447,7 @@
 @example
 @group
   [L, U, P] = lu (A); ## now L*U = P*A
-  x = U \ L \ P*b;
+  x = U \ (L \ P)*b;
 @end group
 @end example
 
@@ -526,7 +526,7 @@
 
 The primary distinction is that an assumed zero, when multiplied
 by any number, or divided by any nonzero number,
-yields *always* a zero, even when, e.g., multiplied by @code{Inf}
+yields @strong{always} a zero, even when, e.g., multiplied by @code{Inf}
 or divided by @code{NaN}.
 The reason for this behavior is that the numerical multiplication is not
 actually performed anywhere by the underlying algorithm; the result is



An explanation about the 2nd change:

the following equivalent expressions are all wrong

x = U \ L \ P * b
x = (U \ L) \ P * b
x = (U \ L \ P) * b
x = inv(inv(U) * L) * P * b


the following equivalent expressions are all right

x = U \ (L \ P) * b
x = U \ (L \ P * b)
x = inv(U) * inv(L) * P * b


these can be verified directly in Octave such as

A = randn(5);
b = randn(5,1);
x = A \ b;
[L, U, P] = lu (A);
L*U - P*A          ## L*U == P*A
x - U \ (L \ P)*b  ## x == U \ (L \ P)*b
x - U \ L \ P*b    ## x != U \ L \ P*b





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52814>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]