Opened 13 years ago

Closed 12 years ago

#2665 closed defect (invalid)

error in coercion between CIF and SR

Reported by: ncalexan Owned by: robertwb
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: coercion Keywords: symbolic SR complex interval field CIF
Cc: ncalexan Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: SR(0) * CIF(I)
---------------------------------------------------------------------------
<type 'exceptions.NotImplementedError'>   Traceback (most recent call last)

/Users/ncalexan/Documents/School/MATH235/genus2cm/<ipython console> in <module>()

/Users/ncalexan/Documents/School/MATH235/genus2cm/element.pyx in sage.structure.element.RingElement.__mul__()

/Users/ncalexan/Documents/School/MATH235/genus2cm/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.bin_op_c()

/Users/ncalexan/Documents/School/MATH235/genus2cm/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.get_action_c()

/Users/ncalexan/Documents/School/MATH235/genus2cm/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.discover_action_c()

/Users/ncalexan/Documents/School/MATH235/genus2cm/parent.pyx in sage.structure.parent.Parent.get_action_c()

/Users/ncalexan/Documents/School/MATH235/genus2cm/parent.pyx in sage.structure.parent.Parent.get_action_impl()

/Users/ncalexan/Documents/School/MATH235/genus2cm/parent.pyx in sage.structure.parent.Parent.get_action_c_impl()

/Users/ncalexan/Documents/School/MATH235/genus2cm/parent.pyx in sage.structure.parent._register_pair()

<type 'exceptions.NotImplementedError'>: Infinite loop in multiplication of [1.0000000000000000 .. 1.0000000000000000]*I (parent Complex Interval Field with 53 bits of precision) and 
                                       0 (parent Symbolic Ring)!}}}

Change History (4)

comment:1 follow-up: Changed 13 years ago by mhansen

I now get this:

sage: SR(0) * CIF(I)
0
sage: _.parent()
Complex Interval Field with 53 bits of precision

Is that the result you wanted?

comment:2 in reply to: ↑ 1 Changed 12 years ago by roed

I would say that this is still wrong. In particular, the result

sage: CIF.has_coerce_map_from(SR)
True

is incorrect. But fixing that needs to wait on more general coercion rewrites.

Replying to mhansen:

I now get this:

sage: SR(0) * CIF(I)
0
sage: _.parent()
Complex Interval Field with 53 bits of precision

Is that the result you wanted?

comment:3 Changed 12 years ago by robertwb

If there is a coercion, surly this is the only direction it goes, right?

comment:4 Changed 12 years ago by mhansen

  • Milestone changed from sage-4.0.1 to sage-duplicate/invalid/wontfix
  • Resolution set to invalid
  • Status changed from new to closed

This now works correctly with the update to pynac:

sage: SR(0) * CIF(I)
0
sage: a = _
sage: a.parent()
Symbolic Ring
sage: a.pyobject().parent()
Complex Interval Field with 53 bits of precision
Note: See TracTickets for help on using tickets.