| 11 | |
| 12 | Looking at it a little bit more, I think the error is in fact in `__pow__` (sage/rings/qqbar.py:4233). I expect it's not invalid for `_value` to be a RIF element. That seems to happen quite a bit: |
| 13 | {{{ |
| 14 | sage: type(QQbar(5)._value) |
| 15 | <type 'sage.rings.real_mpfi.RealIntervalFieldElement'> |
| 16 | }}} |
| 17 | It's just that elements where that happens are usually filtered out earlier. So in this case, `d` isn't recognized as a rational number yet when we enter, but then in the for loop on line 4304, we have that on line 4322 we execute: |
| 18 | {{{ |
| 19 | val = self._interval_fast(prec) |
| 20 | }}} |
| 21 | So actually, on the first pass `val` is a CIF element. We apparently get an error on the second pass, when `val` has been forced through `_interval_fast`. |
| 22 | |
| 23 | So I see two solutions: either ensure that val is put back into CIF or ensure that "argument extraction" is done appropriately in cases where "val" is in RIF. |