On Wed, 17 Sep 2008 02:26:26 -0800, glen herrmannsfeldt posted:
> Ron Ford wrote:
> (snip, I wrote)
Do you think I should be more explicit with writing ?
>
>>>As far as the original question, I believe it is
>>>one fourth, not one eighth.
> (snip)
>
>> How did we miss half of the cases?
> (snip)
>
>> %%- INT_MAX is 7. UB is invoked when the values are:
>> %%-
>> %%- 7 and any of -1, -2, -3, -4, -5, -6, -7, -8
>> %%- 6 and any of -2, -3, -4, -5, -6, -7, -8
>> %%- 5 and any of -3, -4, -5, -6, -7, -8
>> %%- 4 and any of -4, -5, -6, -7, -8
>> %%- 3 and any of -5, -6, -7, -8
>> %%- 2 and any of -6, -7, -8
>> %%- 1 and any of -7, -8
>> %%- 0 and -8
>
> The other half are negative numbers minus positive numbers,
> with the result below -8.
>
> -- glen
Of course, you mean below negative seven, but the other half of cases is
almost suggested by the custom quote there with the negative in front of
the first arg and then the same positive values on the right.
It was so simple to write a fortran program that the busts the C int
datatype. One thing I dislike so much about c is struggling with the
format specifiers with printf, while with fortran it's just print * for
something quick and sleazy.
--
A cynic is a man who, when he smells flowers, looks around for a coffin.
H. L. Mencken