#18210: numerical bug in incomplete gamma function
-------------------------------------------------+-------------------------
       Reporter:  VivianePons                    |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.7
      Component:  symbolics                      |   Resolution:
       Keywords:  sd67                           |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Reported upstream. Developers  |  Work issues:
  acknowledge bug.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by buck):

 I believe I've fixed the `ValueError: unknown prototype character 'b'`
 issue. Pari recently added the concept of "bit precision", which (I
 believe) is the natural precision format in sage, so needs no conversion:

 {{{#!diff
 diff --git a/src/sage_setup/autogen/pari/args.py
 b/src/sage_setup/autogen/pari/args.py
 index 57356b4..a2749df 100644
 --- a/src/sage_setup/autogen/pari/args.py
 +++ b/src/sage_setup/autogen/pari/args.py
 @@ -254,6 +254,16 @@ class PariArgumentPrec(PariArgumentClass):
          s = "        {name} = prec_bits_to_words({name})\n"
          return s.format(name=self.name)

 +class PariArgumentBitPrec(PariArgumentClass):
 +    def _typerepr(self):
 +        return "bitprec"
 +    def ctype(self):
 +        return "long"
 +    def always_default(self):
 +        return "0"
 +    def get_argument_name(self, namesiter):
 +        return "bitprecision"
 +
  class PariArgumentSeriesPrec(PariArgumentClass):
      def _typerepr(self):
          return "serprec"
 @@ -277,6 +287,7 @@ pari_arg_types = {
          'U': PariArgumentULong,
          'n': PariArgumentVariable,
          'p': PariArgumentPrec,
 +        'b': PariArgumentBitPrec,
          'P': PariArgumentSeriesPrec,

      # Codes which are known but not actually supported for Sage
 }}}

 There's again a further issue that I don't understand yet:

 {{{
 Compiling sage/libs/pari/pari_instance.pyx because it depends on
 sage/libs/pari/auto_instance.pxi.
 [1/2] Cythonizing sage/libs/pari/gen.pyx

 Error compiling Cython file:
 ------------------------------------------------------------
 ...

             [0 0 -2 -1]
         """
         cdef GEN _al = al.g
         pari_catch_sig_on()
         cdef GEN _ret = algmultable(_al)
                                   ^
 ------------------------------------------------------------

 sage/libs/pari/auto_gen.pxi:1558:35: Call with wrong number of arguments
 (expected 2, got 1)
 }}}

 On brief inspection, I don't see that the number of arguments should have
 changed.

--
Ticket URL: <http://trac.sagemath.org/ticket/18210#comment:33>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to