On Tue, May 4, 2010 at 11:05 AM, Jason Grout
<[email protected]> wrote:
> On 05/04/2010 11:41 AM, William A. Stein wrote:
>>
>>
>>
>>
>> On May 4, 2010, at 9:06 AM, Jason Grout<[email protected]>
>>  wrote:
>>
>>> On 05/04/2010 10:30 AM, William A. Stein wrote:
>>>
>>>> I think I wrote the original code for this, and I am ok with the change
>>>> you suggest, since our policy on explicit coercions is to make them work
>>>> when they make (some) mathematical sense.
>>>
>>>
>>> A related question is that conversion from CC or CDF to long, int, ZZ, or
>>> QQ also fails, though doing something like ZZ(RR(CC(1))) works.
>>>
>>> Should conversion to an integer or rational try to work if the imaginary
>>> part is zero?
>>
>> Yes.   And note that the implementation of QQ(RR(...   is pretty
>> nontrivial.
>>
>
> Can I punt to that, so the tricky code is all in one place?

Yes, definitely!

>  I'm not sure
> how to make the coercion system convert CC to RR before converting to QQ.
>
> Thanks,
>
> Jason
>
> --
> To post to this group, send an email to [email protected]
> To unsubscribe from this group, send an email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to