#17586: Inconsistency in DirichletGroup(1)[0].bernoulli(1)
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.5
      Component:  modular forms      |   Resolution:
       Keywords:  Dirichlet          |    Merged in:
  character Bernoulli number         |    Reviewers:
        Authors:  Peter Bruin        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  ada9c0109f1eefff8164278fbc15440724cbf31b
  u/pbruin/17586-bernoulli_1         |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Peter Bruin', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => ada9c0109f1eefff8164278fbc15440724cbf31b
 * branch:   => u/pbruin/17586-bernoulli_1
 * author:   => Peter Bruin


Old description:

> If `chi` is the trivial Dirichlet character, then `chi.bernoulli(1)`
> returns different results depending on the algorithm:
> {{{
> sage: chi = DirichletGroup(1)[0]
> sage: chi.bernoulli(1)  # algorithm='recurrence'
> -1/2
> sage: chi.bernoulli(1, algorithm='definition', cache=False)
> 1/2
> }}}
> The documentation is consistent with the answer `1/2`.  The answer `-1/2`
> can be explained as being the result of
> {{{
> sage: bernoulli(1)
> -1/2
> }}}
> since the `bernoulli()` function returns the traditional "first Bernoulli
> numbers".
>
> We should decide which convention to use, and update the documentation if
> necessary.
>
> Discussion on sage-nt: https://groups.google.com/forum/#!topic/sage-
> nt/n5wUmDJHCto

New description:

 If `chi` is the trivial Dirichlet character modulo 1, then
 `chi.bernoulli(1)` returns different results depending on the algorithm:
 {{{
 sage: chi = DirichletGroup(1)[0]
 sage: chi.bernoulli(1)  # algorithm='recurrence'
 -1/2
 sage: chi.bernoulli(1, algorithm='definition', cache=False)
 1/2
 }}}
 The documentation is consistent with the answer `1/2`.  The answer `-1/2`
 can be explained as being the result of
 {{{
 sage: bernoulli(1)
 -1/2
 }}}
 since the `bernoulli()` function returns the traditional "first Bernoulli
 numbers".

 This ticket changes the method `DirichletCharacter.bernoulli()` so that it
 always returns `1/2` in this case, and expands the documentation.

 Discussion on sage-nt: https://groups.google.com/forum/#!topic/sage-
 nt/n5wUmDJHCto

--

--
Ticket URL: <http://trac.sagemath.org/ticket/17586#comment:2>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to