Re: why does a/(b/c) = a(c/b)?
Dave Long <[email protected]> Thu, 10 Apr 2014 11:50:58 +0200
| Newsgroups | gmane.culture.people.kragen.discuss |
|---|---|
| Message-ID | <[email protected]> |
I would argue that the whole point of a division is that it is the inverse of multiplication. This is why, in noncommutative settings (eg. finite state machines), one is careful to distinguish A/B from B\A. In the first case, (A/B)B = A, but in the second B(B\A) = A. So I would say that if you have a formal system where a/(b/c) differs from a(c/b), it would be better to pick some other symbol than solidus for the operation. (we know that people insist on using '+' for string concatenation despite the lack of commutativity, so this is obviously a personal opinion). -Dave An exercise: suppose your division is not an exact inverse (eg, python's '//', where (a//b)*b <= a): can we still say something useful about the relation between a//(b//c) and a*(c//b) ? -- To unsubscribe: http://lists.canonical.org/mailman/listinfo/kragen-discuss