git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Christian Couder <christian.couder@gmail.com>
Date
Aug 3, 2016, 19:56 UTC
Message-ID
<CAP8UFD2ooGO+E05qNAkpR5cNDXjTLWh2NSO6NBZv-LctZOFSaw@mail.gmail.com>
In-Reply-To
<20160803191334.jflia6cqxqx2uqjx@sigill.intra.peff.net>
On Wed, Aug 3, 2016 at 9:13 PM, Jeff King <peff@peff.net> wrote:
Show 28 quoted lines
> On Mon, Aug 01, 2016 at 03:31:45PM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>>
>> >> *1* I have a slight suspicion that this is cultural, i.e. how
>> >> arithmetic is taught in grade schools.  When an apple costs 30 yen
>> >> and I have 5 of them, I was taught to multiply 30x5 to arrive at
>> >> 150, not 5x30=150, and I am guessing that is because the former
>> >> matches the natural order of these two numbers (cost, quantity) in
>> >> the language I was taught.
>> >
>> > You might be right. I was trying to figure out what is "natural" for me
>> > in these cases, but after thinking about it for 2 minutes, I'm pretty
>> > sure anything resembling "natural" is lost as I try to out-think myself. :)
>>
>> Do native English speakers (or more in general Europeans) think of
>> the apple example more like "5 apples, 30 cents each", and do 5x30?
>
> 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. I'm pretty sure "half
> of ten 30's" was not taught in schools. All I remember of grade school
> multiplication is them insisting we write down all of our steps, no
> matter how trivial the problem would be to do in our heads. :)
Yeah, I would be tempted to write all the steps too like this:
"An apple costs 30 yen and I have 5 of them" means:

Cost(1 apple) = 30 cents Cost(5 apples) = 5 * Cost(1 apple) = 5 * 30 cents = 150 cents

so it would be more "5x30=150" than "30x5" in this case for me.
Previous: Jeff KingNext: Junio C Hamano
Message 7 of 12 in “pass constants as first argument to st_mult()”
  1. pass constants as first argument to st_mult()René Scharfe, Jul 30, 2016
  2. Jeff KingAug 1, 2016
  3. Junio C HamanoAug 1, 2016
  4. Jeff KingAug 1, 2016
  5. Junio C HamanoAug 1, 2016
  6. Jeff KingAug 3, 2016
  7. Christian CouderAug 3, 2016
  8. Junio C HamanoAug 3, 2016
  9. Jeff KingAug 3, 2016
  10. Junio C HamanoAug 3, 2016
  11. Stefan BellerAug 3, 2016
  12. Jeff KingAug 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.