Long Multiplication is not commutative.
David C. Ullrich
ullrich at math.okstate.edu
Fri Apr 7 12:16:41 EDT 2000
Christian Tismer wrote:
> Yikes!
>
> No, it is computatively commutative, just not in terms
> of computation time. :-))
> [...]
> Swapping the multiplicands would be a 5 line patch.
> Should I submit it?
My vote would be yes - long multiplication is slow enough
that it's hard to see why anyone would object to the tiny slowdown
in the case where the swap is not needed. (Hard for _me_ to see,
anyway, which proves very little...)
(I've noticed the same phenomenon in my silly little "numeric"
types - always assumed it was fixed long ago in grownup types.)
>
> ciao - chris
>
> --
> Christian Tismer :^) <mailto:tismer at appliedbiometrics.com>
> Applied Biometrics GmbH : Have a break! Take a ride on Python's
> Kaunstr. 26 : *Starship* http://starship.python.net
> 14163 Berlin : PGP key -> http://wwwkeys.pgp.net
> PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
> where do you want to jump today? http://www.stackless.com
More information about the Python-list
mailing list