Opened 9 years ago

Closed 6 years ago

#11872 closed defect (duplicate)

Discriminant and resultant of RDF polynomials fails

Reported by: jdemeyer Owned by: AlexGhitza
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: basic arithmetic Keywords: real complex double field resultant
Cc: Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

sage: R.<x> = PolynomialRing(RDF)
sage: x.discriminant()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/usr/local/src/sage-4.7.2.alpha2/<ipython console> in <module>()

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_element.so in sage.rings.polynomial.polynomial_element.Polynomial.discriminant (sage/rings/polynomial/polynomial_element.c:28999)()

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_singular_interface.pyc in resultant(self, other, variable)
    351         return lcm_func(self, singular, have_ring)
    352     def resultant(self, other, variable=None):
--> 353         return resultant_func(self, other, variable)
    354
    355 def _singular_func(self, singular=singular_default, have_ring=False):

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_singular_interface.pyc in resultant_func(self, other, variable)
    499     if variable is None:
    500         variable = self.parent().gen(0)
--> 501     rt = self._singular_().resultant(other._singular_(), variable._singular_())
    502     r = rt.sage_poly(self.parent())
    503     if self.parent().ngens() <= 1 and r.degree() <= 0:

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
    586
    587     def __call__(self, *args, **kwds):
--> 588         return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds)
    589
    590     def help(self):

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/interfaces/interface.pyc in function_call(self, function, args, kwds)
    487                                        [s.name() for s in args],
    488                                        ['%s=%s'%(key,value.name()) for key, value in kwds.items()])
--> 489         return self.new(s)
    490
    491     def _function_call_string(self, function, args, kwds):

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/interfaces/interface.pyc in new(self, code)
    262
    263     def new(self, code):
--> 264         return self(code)
    265
    266     ###################################################################

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/interfaces/singular.pyc in __call__(self, x, type)
    667             x = str(x)[1:-1]
    668
--> 669         return SingularElement(self, type, x, False)
    670
    671     def has_coerce_map_from_impl(self, S):

/usr/local/src/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/interfaces/singular.pyc in __init__(self, parent, type, value, is_name)
   1130             except (RuntimeError, TypeError, KeyboardInterrupt), x:
   1131                 self._session_number = -1
-> 1132                 raise TypeError, x
   1133         else:
   1134             self._name = value

TypeError: Singular error:
   ? not implemented
   ? error occurred in or before STDIN line 57: `def sage12=resultant(sage8,sage11,sage8);`

For RR instead of RDF, it does work.

Change History (4)

comment:1 Changed 7 years ago by chapoton

  • Summary changed from Discrimant of RDF polynomials fails to Discriminant and resultant of RDF polynomials fails

the problem is already in resultant

sage: x.resultant(x)

comment:2 Changed 7 years ago by chapoton

see #10978

comment:3 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-6.1 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.