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

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

[Octave-bug-tracker] [bug #46598] unable to get single eps when specifyi


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #46598] unable to get single eps when specifying class
Date: Fri, 04 Dec 2015 17:55:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.4.0

Follow-up Comment #3, bug #46598 (project octave):

> As for this bug, what would follow the principle of least surprise? Would it
be to remove functionality and adopt the Matlab API for this function? Would
it be to remove the 'eps (..., CLASS)' functionality and just support 'eps
(CLASS)'

Least surprise is subjective. I'd argue that in this case, it would be expect
the user to specify X.  At the moment, the problem arises because when the
user calls "eps (M, N, K)", we do not know if M is the number of rows or the X
argument.  Since we can't make an educated guess we should not be assuming a
default.  Therefore I'd propose the following as the least surprise:


eps ()         => eps (1)
eps (CLASS)    => eps (1, CLASS)
eps (X, CLASS) => distance between X and next value in CLASS
eps (M, N, K)  => repmat (eps (M), N, K)
eps (M, N, K, CLASS) => repmat (eps (M, CLASS), N, K)


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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