On May 16, 1:20 am, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> What I think should happen is that sqrt(2) should be an element of QQ
> [sqrt(2)] rather than an element of SR. There is work supporting this  
> kind of thing in the new coercion model (specifically, sqrt(2) would  
> be an element of QQ[sqrt(2)] with a specified embedding into RR, so  
> stuff like RR(1) + sqrt(2) would work). Then this kind of casting  
> could make a lot more sense.

Anybody who implements this should steal code from qqbar.py.

AA/QQbar can basically be divided into two parts: a framework for lazy
arbitrary-precision arithmetic, that does computations using interval
arithmetic whenever the interval arithmetic suffices to give an answer
to the desired precision; and an exact layer that is used when the
interval arithmetic is insufficiently precise.  This exact layer is
almost exactly what you describe above: it maintains extensions of QQ
with embeddings into RR or CC, and automatically combines the
extensions to let you do arithmetic like sqrt(2) + sqrt(3).

I probably won't do it myself, but I would be very happy if somebody
cleaned up this exact layer and moved it into number fields.

Carl
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to