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

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

[Octave-bug-tracker] [bug #47775] realpow and sparse-xpow.cc-tst fail wi


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47775] realpow and sparse-xpow.cc-tst fail with C++11 and gcc < 4.9.2
Date: Tue, 03 May 2016 22:59:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #24, bug #47775 (project octave):

I agree with Rik.

If either input to realpow(i,2) is changed by an epsilon, then realpow
*should* fail.  If code relies on it succeeding, that is like code relying on
(sin(pi) == 0) == true, or 0:0.1:10 having exactly 11 elements.

All of these are discrete magnifications of (lack of) round-off error.  Why
should  exp (y * log (x)) should give real results for even y and imaginary x,
unless (sin((y/2)*pi) == 0) == true?

It seems that the libraries "normally" take integer y as a special case and
implement it by repeated multiplication and g++11 4.8 didn't, but unless it is
documented that it should take that special case, it is not a bug for it not
to.

Sorry if I'm just adding noise to this discussion, but I haven't heard an
argument why this round-off is different from any other round-off affecting
edge cases.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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