Might be useful for testing, both for ourselves and for others using num-rational. (from rust-num/num#241, cc rust-num/num#293.)