fix rational gcd bug, add rational number operators into api