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

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

[Octave-bug-tracker] [bug #32528] error: memory exhausted


From: Rik
Subject: [Octave-bug-tracker] [bug #32528] error: memory exhausted
Date: Tue, 29 Mar 2011 15:20:42 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16

Follow-up Comment #8, bug #32528 (project octave):

Could you verify that the latest development code does not contain the bug? 
The magform routine was changed Mar. 15th, 2011 to solve another bug and is
now much simpler.  See the diff results below where the entire clause has been
reduced to just two lines.  It would be nice if this change has also fixed
this bug.
+verbose+
-      double l = std::log10 (std::abs (x));
-      double r = std::fmod (l, 1.);
-      a = std::pow (10.0, r);
-      b = static_cast<int> (l-r);
-      if (a < 1)
-        {
-          a *= 10;
-          b -= 1;
-        }
-
-      if (x < 0)
-        a = -a;
+      b = static_cast<int> (gnulib::floor (std::log10 (std::abs (x)))); 
+      a = x / std::pow (10.0, b); 
-verbose-

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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