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

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

[Octave-bug-tracker] [bug #59486] p variable not always defined in eigs


From: Rik
Subject: [Octave-bug-tracker] [bug #59486] p variable not always defined in eigs function
Date: Fri, 20 Nov 2020 12:29:20 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

Follow-up Comment #7, bug #59486 (project octave):

Change looks fine.  

And eps() called with an argument is actually exactly what you want.  When
called as eps (X) it gives you the machine precision around the number (X). 
When called with no argument it gives the machine precision around the default
(1).  So X*eps(1) is very much related to eps (X), but they are not always
identical.  For example,


octave:1> eps (65) - 65*eps
ans = -2.2204e-16


Not so bad, but consider a larger number


octave:7> e1 = eps (1e6)
e1 = 1.1642e-10
octave:8> e2 = 1e6*eps
e2 = 2.2204e-10
octave:9> delta = e2 - e1
delta = 1.0563e-10
octave:10> percent_change = delta / e1 * 100
percent_change = 90.735


In this case, the kluge way of calculating machine precision is of by 90%.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59486>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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