Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-15 Thread William Stein
On Thu, Sep 15, 2022 at 7:36 PM Kwankyu Lee wrote: > On Friday, September 16, 2022 at 10:46:09 AM UTC+9 wst...@gmail.com wrote: > >> I just happened to stumble again on the original scrap of paper just >> now where I made up the name >> Sage back in 2004. >> > > A good photo of it deserves to be

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-15 Thread Kwankyu Lee
On Friday, September 16, 2022 at 10:46:09 AM UTC+9 wst...@gmail.com wrote: > I just happened to stumble again on the original scrap of paper just > now where I made up the name > Sage back in 2004. > A good photo of it deserves to be permanently placed in the history section of the sagemath

[sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-15 Thread Jeremy Tan
There is now an Arb equivalent of the Sage ticket that implements the generalised Bernoulli function but nothing else: https://github.com/fredrik-johansson/arb/pull/438 Any further equivalents (e.g. on mpmath) will be edited into the description of the Sage ticket rather than being mailed

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-14 Thread Jeremy Tan
https://trac.sagemath.org/ticket/34536 There, Luschny! On why I initially only changed B_1 = +½, I have a rebuttable demand of my code: *it must be as beautiful as the maths it implements*. Having bernoulli_gen() (your generalised Bernoulli function as implemented in the SageMath ticket)

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-14 Thread Jeremy Tan
Thank you for coming, Luschny. I not only wholeheartedly believe B_1 = +½ and that there is no convention about it, but also that I believe in the reality and usefulness of the Bernoulli, Euler and other functions you defined in your 2020 paper. When I implemented those functions in SymPy there

[sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-14 Thread Peter Luschny
tl;dr, 80 lines, sorry. I think there is a better alternative than changing the current implementation of the Bernoulli numbers. Fredrik: "The sign convention for B_1 is fairly arbitrary, ..." Calling the question a 'convention' sets a wrong framing from the start. Conventions are treated

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread John H Palmieri
I have no opinions about what B_1 should be, but I am concerned about potential confusion: some users will expect one value for B_1, others will expect a different value, and so one group or other will end up being confused when answers don't come out the way they expect. The safest course

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread Jeremy Tan
On Tue, 13 Sept 2022, 17:00 David Joyner, wrote: > Let's play nice here, okay? Let me explain what I mean in a nicer way. Not defining B_1 looks good on the surface given the current discussion, but is really a strictly worse option than defining B_1 = +½ or -½ because then the n = 1 case has

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread Dima Pasechnik
On Tue, Sep 13, 2022 at 10:35 AM Oscar Benjamin wrote: > > On Mon, 12 Sept 2022 at 22:09, Fredrik Johansson > wrote: > > > > The claim "bernoulli_plus admits a natural generalisation to real and > > complex numbers but bernoulli_minus does not" (made elsewhere in this > > thread) seems a bit

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread Oscar Benjamin
On Mon, 12 Sept 2022 at 22:09, Fredrik Johansson wrote: > > The claim "bernoulli_plus admits a natural generalisation to real and complex > numbers but bernoulli_minus does not" (made elsewhere in this thread) seems a > bit hyperbolic. For B+ this natural generalization is -n*zeta(1-n); for B-

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread David Joyner
On Tue, Sep 13, 2022 at 3:43 AM Jeremy Tan wrote: > > A simpleton's way of getting out of the problem indeed. PARI/GP's > documentation says: > Let's play nice here, okay? > ? ?bernvec > bernvec(n): returns a vector containing, as rational numbers, the Bernoulli > numbers B_0, B_2, ...,

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread Jeremy Tan
A simpleton's way of getting out of the problem indeed. PARI/GP's documentation says: ? ?bernvec bernvec(n): returns a vector containing, as rational numbers, the Bernoulli numbers B_0, B_2, ..., B_{2n}. ? bernfrac(3) %2 = 0 ? bernfrac(5) %3 = 0 So not only B_1 but also B_3, B_5, etc. have

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-13 Thread Vincent Delecroix
PARI/GP actually has a better convention : only even Bernoulli numbers exist ? bernvec(5) %1 = [1, 1/6, -1/30, 1/42, -1/30, 5/66] And the two conventions can be recovered as evaluations of Bernoulli polynomials at 0 and 1 respectively ? [subst(bernpol(n), x, 0) | n <- [1..6]] %2 = [-1/2, 1/6,

[sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-12 Thread Jeremy Tan
On Tuesday, 13 September 2022 at 10:00:20 UTC+8 edgardi...@gmail.com wrote: > The choice of the sign is arbitrary. So why make this change? What is the > benefit? > Most recent papers, algebra systems > (Maple/Mathematica/Magma/Matlab/Oscar), and libraries > (Pari/Flint/Mpmath/ARB) seemed to

Re: [sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-12 Thread William Stein
On Mon, Sep 12, 2022 at 7:00 PM edgardi...@gmail.com wrote: > > The choice of the sign is arbitrary. So why make this change? What is the > benefit? The answer to that question is what the website http://luschny.de/math/zeta/The-Bernoulli-Manifesto.html is all about. I think you have to read

[sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-12 Thread edgardi...@gmail.com
The choice of the sign is arbitrary. So why make this change? What is the benefit? Most recent papers, algebra systems (Maple/Mathematica/Magma/Matlab/Oscar), and libraries (Pari/Flint/Mpmath/ARB) seemed to have picked B_1 = -1/2. Thus why put work into changing the default value and go against

[sage-devel] Re: On changing Bernoulli(1) to +½

2022-09-12 Thread Fredrik Johansson
I'm pretty neutral about this change, but I've received PRs for FLINT and mpmath (presumably there will be one for Arb as well) so I suppose I will need to make a decision about merging or closing them sooner or later :-) The sign convention for B_1 is fairly arbitrary, and the downside of