3 ms·
If, for a moment, you conceptualize of multiplication on non-negative whole numbers as repeated addition, then this is the algorithm: procedure product(multi
by gugagore 6y ago
If, for a moment, you conceptualize of multiplication on non-negative whole numbers as repeated addition, then this is the algorithm:
procedure product(multiplier, multiplicand)
acc := 0
for i = 1 to multiplier
acc := acc + multiplicand
end
return acc
end
Swapping the arguments is a different computation. But after thinking about it, you realize that you get the same answer all the same. That's the point of
> (2 rows × 3 chairs/row) is not the same as (3 rows × 2 chairs/row), even though both sets contain 6 chairs.
The point with bringing up dimensional analysis is that the above algorithm doesn't work because what does it mean to do `for i = 1 to 3 chairs/row`? You might think of it like
procedure product(multiplier, multiplicand)
acc := "0" # an "absolute" zero that cooperates with any dimension
each single_multiplier in multiplier
acc := acc + (multiplicand * single_multiplier)
end
return acc
end
But then what is `(multiplicand * single_multiplier)` ?