(j3.2006) Interpretation F08/0055
Robert Corbett
robert.corbett
Thu Aug 18 04:09:06 EDT 2011
On 08/17/11 23:43, Malcolm Cohen wrote:
>> The answer given to question Q6
>> ("No.") is at best misleading.
>
> I disagree.
>
>> Question Q6 includes an example that shows a
>> sequence of increasing values being written
>> and a sequence of values in mixed order being
>> written. The question is is that result the
>> intended result, and the answer is no. That
>> is technically correct, but misleading. The
>> example given depends on the scale factor
>> being nonzero.
>
> That question is specifically about 1PGw.0, so naturally this is the
> case. Are you objecting to the question? Of course there are lots
> more questions that could be asked...
I assumed the questioner intended the question to be
applied more broadly than to the specific example he
gave. I thought his intent was to ask if the edited
values produced by a G edit descriptor should retain
the order relation of the original values (up to the
edited values becoming equal).
> Do you think we should be trying to "fix" more of the "weird output"
> cases? Or trying to fix none of them? I guess there is no hurry to
> decide on this since G editing has been broken for at least 7 years
> and weird forever.
>
>> The edits speak of the "decimal exponent value,"
>> without giving a definition of the term.
>
> Yes, this is a mistake.
>
>> A definition of the
>> term that works is that the decimal exponent
>> value of a number N is FLOOR(LOG10(ABS(N)))+1.
>
> No, that doesn't work, because LOG10 does not accept an INTEGER
> argument. And it is not required that a processor possesses a
> floating-point kind which can represent every integer value either.
>
> Perhaps you meant to write something like log<sub>10</sub> instead of
> using Fortran notation.
I did mean the mathematical expression, not Fortran
code. The Fortran standard used to use Fortran
notation for expressions meant to be interpreted as
mathematical expressions, in the definition of NINT
for example. I checked and found that those
definitions have been altered so that they no
longer use Fortran notation.
The symbol N in question is the symbol N from
clause 10.7.5.2.2, which is neither a Fortran
integer nor a Fortran floating-point value.
>
> It's probably better to add words something like "corresponding to a
> mantissa in the range 0.1<=m<1".
>
> And I don't think we should be using the mathematical notation for
> floor (or indeed ceiling) either, since many of the readers of the
> standard will not recognise it.
I tried other definitions. The mathematical formula was
the most compact definition I found that precisely
specified the value. One alternative I tried was to
describe the value in terms of editing under an E edit
descriptor with a scale factor of zero. That approach
had the advantage that it applied I/O rounding implicitly.
Bob Corbett
More information about the J3
mailing list