I'd been trying to come up with something that could qualify as a division machine. One idea was portioning out the desired amount of water and letting it spread into the appropriate number of tiles (quotient would be water depth), but it turned into a godawful mess. Measuring out precise amounts of water is pretty difficult, moving it into the spreading area without losing any is even more difficult and re-setting the measuring chamber for the next round would be even more heinously tricky. I was so annoyed with the thing that when a miner insisted on drowning himself (stood on the tile to be channelled when expanding the well, so promptly landed in 7/7 water without an adjacent ramp and flat out refused taking digging jobs that would have lowered the water and saved him) i snapped, crashed the game and wiped the save.
After a little thought on the workings of minecart collisions, an option presented itself:
the minecart-collision integrator. Terribly simple.
Observation (surmised previously, empirically proven by this device) for collisions into a standing cart:
v(o) = min {[v(i)*m(i)/m(o)],[v(i)]}
in proper words: when a moving minecart (incoming) crashes into a standing minecart (outgoing), the velocity of the outgoing cart is the product of incoming cart's speed and mass, divided by the outgoing cart's mass. Outgoing speed is capped at incoming speed, collisions will not result in speed increases.
Friction poses a bit of a problem: it seems quite low, at -0,1 mt/s² on engraved track when moving in a straight line, but that translates into a 1% of a tile per step speed lost over the 100 steps measured run-time, which translates into an expected distance loss of 1/2 tile. This is liable to hit collisions with low output speed harder, but needs correcting in any case when you want to use distance travelled as proper output.
In the built machine, the incoming cart comes from ten z-levels above, passes over a pressure plate disengaging a gear assembly driving the whole line of rollers and pushes the outgoing cart that stands two tiles behind the pressure plate. The incoming cart thus comes to rest one tile behind the pressure plate, so the plate will recover 99 steps later. Tests without an outgoing cart and with an almost-same weight cart say the incoming cart would move 112 steps before the rollers re-gained power. That's only by extrapolation, because, as eagle-eyed readers will have spotted right away, this device has only 107 tiles of roller. All rollers sit on "reverse-outwards" track corners; the first active roller will push the cart into the wall directly north (west in the southward branch). The number of tiles the cart has travelled is 112*incoming cart's mass/outgoing cart's mass. By switching incoming and outgoing carts around, a variety of divisions can be performed. Obviously, no result larger than 107 can be produced practically, and no result above 112 theoretically (outgoing speed is capped to never exceed incoming speed). Combining very low incoming and very high outgoing masses results in rather vague results - if a willow cart is used for pushing, the equation is 1680/outgoing cart's mass. You won't see a difference in distance travelled between outgoing masses of 342 (brass) and 357 (copper), because the result will always be an integer number. Using different types of wooden carts as outgoing masses gives nicely distinct results.
Operation speeds far above 1 t/s might cause additional problems, because the cart might be able to take the braking effect of one roller tile and keep going, so it'd be only reflected by the next, giving a false extra tile of distance. They'd also take _very_ long roller chains to measure.
I haven't yet tried changing weights by loading stuff into the carts. It should work correctly, but of course at ~110k speed, the cart contents will fly all over the place all the time. Anyway, i consider the challenge of division conquered.
(Very late edit to meet my standards for a wiki-linked post.)