bugGNU Octave - Bugs: bug #38291, Failing test in...


bug #38291: Failing test in scripts/plot/stemleaf.m

Submitted by:  Julien Bect <jbect>
Submitted on:  Sat Feb 9 15:44:16 2013  
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Thu Feb 21 12:27:27 2013, comment #15:

And, file 27434 should be pushed instead.
And, after that, the report can be closed.

Michael Godfrey <godfrey>
Thu Feb 21 03:14:37 2013, comment #14:

Just to clarify: file #27473 should be removed from this
report and attached to a report on the behavior of the
signbit() function.

Michael Godfrey <godfrey>
Thu Feb 21 02:54:00 2013, comment #13:

OK. I got that (finally)
So, what needs to be done to the changeset you applied
is change the bug #

But, I did not yet mean to submit this as a bug here. There
was discussion on the maintainer's list about how to
deal with this problem which had pretty much settled on
the patch that you found here. I meant to submit it as as a new bug report.


Michael Godfrey <godfrey>
Thu Feb 21 02:45:10 2013, comment #12:

Check Appendix D.4. There is some information there on writing the ChangeLog.

Rik <rik5>
Project Administrator
Thu Feb 21 02:43:23 2013, comment #11:


I just send you a separate email explaining
what I did wrong when attaching the last
patch file.

Again, sorry!


Michael Godfrey <godfrey>
Thu Feb 21 00:42:15 2013, comment #10:

Thanks Rik.

I will try to learn about the changeset format.
When I figure it out should the instructions be added to
the Contributing Guidelines Section of the Manual?

Michael Godfrey <godfrey>
Wed Feb 20 23:37:16 2013, comment #9:

I added a ChangeLog-formatted entry to your second patch and pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/7cfb186592de)

Rik <rik5>
Project Administrator
Sun Feb 17 03:55:23 2013, comment #8:

New changeset which is the same as the previous
code change. But, this one contains the updated

Close after pushing...

(file #27473)

Michael Godfrey <godfrey>
Sat Feb 9 19:00:47 2013, comment #7:

changeset which corrects == 1 to != 0 is attached.

After pushing this change this bug report can be closed.

(file #27434)

Michael Godfrey <godfrey>
Sat Feb 9 17:39:31 2013, comment #6:

Aha. I get
ans =

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

So, this is something that John Eaton could look at.
He just recently wrote the signbit() code. I think
that it should return 1. But, the documentation says
"non-zero." So, either John will decide 1 is right, or
I will change stemleaf to test for non-zero.

If you need this to work right away, you could just make
the obvious change in stemleaf(). I will probably do that
anyhow. Line 206 needs == 1 replaced by != 0

Thanks for submitting this report.

Michael Godfrey <godfrey>
Sat Feb 9 17:09:24 2013, comment #5:
Julien Bect <jbect>
Sat Feb 9 17:07:30 2013, comment #4:

And, at the same time, what does signbit(x)

Michael Godfrey <godfrey>
Sat Feb 9 17:06:19 2013, comment #3:

Right. I got it backwards. stemleaf is dropping the

  1. value in the x vector. There are several possibilities:

What do you get for x after:
x = [22 12 28 52 39 2 12 0 11 11 42 38 44 18 44];
x = -x;

If this produces all negative values (including -0)
then I think the problem may be in signbit() for 32bit

So, tell me what you get for x as above.


Michael Godfrey <godfrey>
Sat Feb 9 16:42:42 2013, comment #2:

Yes, it's the only test that fails (in steamleaf, I mean).

System: Ubuntu 12.10 / 32 bits

Here is what I get after running the test step by step in Octave:

Julien Bect <jbect>
Sat Feb 9 16:10:39 2013, comment #1:

A few questions:

1. Is this the only test that fails?

2. What system are you using?

In any case, this is strange because the error
is in the stored result, not what stemleaf()
returned. But, the display of the stored
result (r2 = ...) is correct.

You could try displaying r2 to see if the traling
"0" did not get stored. You could do this test
directly in Octave, just copy/paste the r2 =

Michael Godfrey <godfrey>
Sat Feb 9 15:44:16 2013, original submission:

I get the following test failure when doing "make check" (or "test stemleaf"):

Julien Bect <jbect>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #27434:  stemleaf_upd_20130209.diff added by godfrey (729B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by jbect (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Feb 20 23:37:16 2013rik5StatusNone=>Fixed
    Sun Feb 17 03:55:23 2013godfreyAttached File-=>Added signbit_logical_with_doc.diff, #27473
    Sat Feb 9 19:00:47 2013godfreyAttached File-=>Added stemleaf_upd_20130209.diff, #27434

    Back to the top

    Powered by Savane 3.1-cleanup