#2329: add interface to Pari's rnfisnorm
-----------------------------------------+----------------------------------
   Reporter:  craigcitro                 |       Owner:  craigcitro       
       Type:  enhancement                |      Status:  needs_work       
   Priority:  major                      |   Milestone:  sage-4.6         
  Component:  number fields              |    Keywords:  editor_craigcitro
     Author:  Craig Citro, Marco Streng  |    Upstream:  N/A              
   Reviewer:  Nick Alexander             |      Merged:                   
Work_issues:  compilation problems       |  
-----------------------------------------+----------------------------------
Changes (by davidloeffler):

  * status:  needs_review => needs_work
  * work_issues:  => compilation problems


Comment:

 Patch applies fine under 4.6.alpha1 but fails to compile:
 {{{
 Error converting Pyrex file to C:
 ------------------------------------------------------------
 ...
         return self.new_gen(thueinit(self.g, flag, prec))


     def rnfisnorminit(self, polrel, flag=2):
         _sig_on
         return self.new_gen(rnfisnorminit(self.g, (<gen>polrel).g, flag))
                                         ^
 ------------------------------------------------------------

 /storage/masiao/sage-4.6.alpha1/devel/sage-
 hacking/sage/libs/pari/gen.pyx:7160:41: undeclared name not builtin:
 rnfisnorminit
 }}}
 Adding
 {{{
     GEN     rnfisnorminit(GEN T, GEN relpol, int galois)
 }}}
 to {{{sage/libs/pari/decl.pxi}}} fixes that issue, but this reveals
 another failure:
 {{{
 sage/libs/pari/gen.c: In function
 ‘__pyx_pf_4sage_4libs_4pari_3gen_3gen_bnfisnorm’:
 sage/libs/pari/gen.c:24097: error: too many arguments to function
 ‘bnfisnorm’
 }}}
 This seems to be because the "prec" argument to "bnfisnorm" has been
 removed, but taking out the extra argument, it *still* doesn't work:
 {{{
 sage -t  number_field_element.pyx
 **********************************************************************
 File "/storage/masiao/sage-4.6.alpha1/devel/sage-
 hacking/sage/rings/number_field/number_field_element.pyx", line 971:
     sage: (beta/2).is_norm(L)
 Exception raised:
     Traceback (most recent call last):
       File "/storage/masiao/sage-4.6.alpha1/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/storage/masiao/sage-4.6.alpha1/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/storage/masiao/sage-4.6.alpha1/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_28[5]>", line 1, in <module>
         (beta/Integer(2)).is_norm(L)###line 971:
     sage: (beta/2).is_norm(L)
       File "number_field_element.pyx", line 999, in
 sage.rings.number_field.number_field_element.NumberFieldElement.is_norm
 (sage/rings/number_field/number_field_element.cpp:8726)
         return self.is_norm(L, element = True, proof = proof)[0]
       File "number_field_element.pyx", line 1017, in
 sage.rings.number_field.number_field_element.NumberFieldElement.is_norm
 (sage/rings/number_field/number_field_element.cpp:9083)
         a, b = self.rnfisnorm(L, certify = proof)
       File "number_field_element.pyx", line 1108, in
 sage.rings.number_field.number_field_element.NumberFieldElement.rnfisnorm
 (sage/rings/number_field/number_field_element.cpp:9820)
         x, q = self._pari_('y').rnfisnorm(rnf_data)
       File "gen.pyx", line 9470, in sage.libs.pari.gen._pari_trap
 (sage/libs/pari/gen.c:45353)
     PariError:  (5)
 **********************************************************************
 }}}
 At that point I gave up. Sorry. That's "needs work".

 David

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2329#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to