Re: [PATCH] pass constants as first argument to st_mult()

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Wed, Aug 03, 2016 at 12:41:30PM -0700, Junio C Hamano wrote:
>
>> On Wed, Aug 3, 2016 at 12:13 PM, Jeff King <peff@xxxxxxxx> wrote:
>> > On Mon, Aug 01, 2016 at 03:31:45PM -0700, Junio C Hamano wrote:
>> >
>> > I think in my head I rewrite any multiplication like "N of M" as having
>> > "N" as the smaller number. I.e., it is conceptually simpler to me to
>> > count five 30's, then 30 five's (even though I do not implement it in my
>> > head as a sequence of additions, of course; I'd probably do that
>> > particular case as "half of ten 30's").
>> >
>> > I have no idea if that's cultural or not, though.
>> 
>> Now, when you say "count five 30's", which one do you have
>> in mind? 5x30, or 30x5?
>> 
>> If you meant the former, I think that _is_ cultural. I am pretty
>> sure that I was taught in school(s) to read 5x30 as adding 5
>> thirty times.
>
> I think I would say "30x5" in that case. But I'm not sure where that
> comes from, and I'm not even 100% sure that I would say that (after
> thinking about it, it's hard for me to figure out what I would have done
> if I _hadn't_ just thought about it).

By the way, reading "30x5" as "count five 30's" disagrees with
calloc(nmemb=5, size=30), which wants to add 30-byte necessary for
each member 5 times to allocate 150 bytes.

Anyway, this tangent is long enough ;-)


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]