Fixed mod to deal with div by zero.
Switch num/err to be members of a union. Don't think this is better,
code-wise, but obviously cleaner memory-wise.
oops