nimber-0.1: An implementation of (finite) nimbers



This is an implementation of the nimbers, which are technically a field over the non-negative ordinals, but in this case are restricted to the non-negative integers. Note that division by n is speedy for n < 16, about one second for n < 256, about a minute for n < 65535, and probably very, very, very slow for n >= 65535.



toNimber :: Integer -> NimberSource

cast any non-negative Integer into a Nimber

nimRecip :: Nimber -> NimberSource

Find the reciprocal of a nimber from the definition. This the very slow, original definition version. It's only here because I like it, really.