So the issue was I had earlier used `pownum` however it was raising a runtime error when `b` is `Rational`. So I kept it this way. I'll just check it again and confirm.