I was just stopping by the chatroom when I noticed your gcd discussion. Having little knowledge of how csympy is written I might have a suggestion. (How pretentious of me!) A friend of mine and I are writing a little C++11 library implementing rational arithmetic (plus soon to be other things) mostly for the purposes of learning the new language. We have a prototype for a
that accepts any class / type as long as it implements
and knows how to evaluate
. The project is cswiercz/rational
and here is the relevant gcd code
. Just thought I'd share.