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

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

[Octave-bug-tracker] [bug #56941] format rat or rats display 0 rather th


From: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #56941] format rat or rats display 0 rather than rational approximation for small numbers
Date: Fri, 4 Oct 2019 21:09:18 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

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

Did it just break 

>>>>> processing
/home/buildbotu/fc25-x86_64/gcc-lto-fedora/build/libinterp/corefcn/pr-output.cc-tst
***** test
 [old_fmt, old_spacing] = format ();
 unwind_protect
   format short;
   assert (rats (2.0005, 9), "4001/2000");
   assert (rats (-2.0005, 10), "-4001/2000");
   assert (strtrim (rats (2.0005, 30)), "4001/2000");
   assert (pi - str2num (rats (pi, 30)), 0, 4 * eps);
   assert (e - str2num (rats (e, 30)), 0, 4 * eps);
   assert (rats (123, 2), " *");
   v = 1 / double (intmax);
   err = v - str2num (rats (v, 12));
   assert (err, 0, 4 * eps);
 unwind_protect_cleanup
   format (old_fmt);
   format (old_spacing);
 end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (rats (2.0005, 9),"4001/2000")
  Location  |  Observed  |  Expected  |  Reason
     []               2    4001/2000     Strings don't match

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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