[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printf integer format compatibility
From: |
Michael D. Godfrey |
Subject: |
Re: printf integer format compatibility |
Date: |
Thu, 17 Apr 2014 00:00:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/16/2014 02:50 PM, John W. Eaton wrote:
This change caused a few new test failures in cases where '%d' was
previously assumed to always produce an integer result. I fixed one
problem in the datestr function by rounding the printf argument that
was used with a '%d' format. I could use some help fixing the
stemleaf function since I'm not sure what the intent is there.
jwe
As I said, the fact that %d now produces non-integer results in some
cases is the
cause of the stemleaf.m failures. Right now, I think that this actually
was a coding error
in stemleaf.m: I was allowing a non-integer step size when it should be
integer.
But, I need to think about this a bit more before committing the change.
The fact that the
changed code passes the tests (also revised) under previous version of
Octave is a good sign.
I suspect that there will be some other places where this change in the
behavior
of %d will reveal problems.
Michael