Bill Allombert on Sat, 30 Sep 2023 10:05:41 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: evaluation of Bernoulli polynomials
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: evaluation of Bernoulli polynomials
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sat, 30 Sep 2023 10:05:34 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696061129; c=relaxed/relaxed; bh=NhUZ9HlqPLD/a+ozvJewIsujsEW7UUDCPp3HZUscLWE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=g3JXgsAvFlV1RxTgra13dNOqd7ONPGsYACwXqF21wRruqMVvcztr3MXeJXliNCY20Qkt/QXHLqwNybv6P5gfNERV8yahH3w5llqIx5xYqIUL80uah0tnz8l0fQnCfWSVz7+P45NvkXoAj1nM9/0D3q2DimAlC/Q9NVRCppo2AbG/QR/0JlsEw+Mu1rzEobVhbJI5S7Df0TrMvdHr/X3B68AVDlLMSPV+T5s3M6eRS4YqdMyNo+PDyvV++FjibztScJwtDUifRFVRBAzt12J21ycghalIJLp50Kt8z4cLbAXGChGm5hQRNKdqMqjqxjclkTRGiwfcC87IwRkXiFfzk4ySNjund+1DqMyCTTHBs3vI1AQ2SS+QqdSuongW2afDSECpKMKRrYPgbF0kMbH9SdOQkT4JA4q45o17cNx2t0/Mm/fND2HHLRygLmvvDGZA9QRUTs09qBVVm9YJJqCl2jiMxxYCPkKYPmbinu7wgxTSxpObJGJIQP8A+aFJhHIslK1Q3LgziPBMZ8JMTw73jWXxVXwTZkSk9ZbHDv063PUH1QGzK79A2QvdTjdrx1lIX9ICcAPH/Ya1wWgdyDYjXi5mInuPJhNbK9w6NGm3THg3V2Z2SX7sbXu6biGKbADpU7pvf9KF6pQzpCy7vKJWVLWcDB0QiZOejt+sJ0+1evU=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696061129; cv=none; b=Qk/os8SyNr3D90/z107Oex8k4FVr9Yr9/+eKCtyAWnfTHsSOBBEX5GjDBLZFibNHiPQYs+xMFI136oGjxCU4qLf2KppN0QSgzutV1g/zHcFtfzIUTNr+p7Is1+YeJxchuobLr+5ODdoGZY/EQEqdILPYk0VvdcjzqV9W+7hmi/FFO7NNI6q6UNAEw66/Rzg65beczfoPbaplqqCy+fRUgyBiqm1Sv5gMFYyWIG9lPT3rEQmMsxi3abuEG9jD6x1YESuMjJoXDfMK3u+9AfaIe0AV7khBqhLN5Cog9lR7pNC0JOo9dmwsz4F84i0ydl/VSm0NjXuCKW3tdmd7eZctK29wHOVCPJ7cWYYDmmx+FarWAYw/ZbRZ9CA3XJaACXRb+wJtgxqOkzEDDmPJkGqZ3dLPzIXke9gSlx2gYrC5NKv3q64Mk2WXMiz3KQmW+VEQYGLiAJ2aaZj8yvG4hfjSSkOdVCliV2e3FrpCTkK2/hENLDfrqfpNgH5vS/10+eD0tUAPtMBqwJec8sNYbaJvN2Lrj77xG+YO7dM0n+gtpGBqwPlys9/V/ODhZXVbmSPbvnX8Ai3tMpBJ3QG5QuNXyO+o1rJMZL9WeUQiVC3/r0H3YxoRjk1HtNdx+4Cr4wr8Fg1+f1fXOcYthOvTZwTjgEo1IoC3g1PuDidTeaIv/NU=
- Authentication-results: smail; arc=none
- Delivery-date: Sat, 30 Sep 2023 10:05:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1696061129; bh=NhUZ9HlqPLD/a+ozvJewIsujsEW7UUDCPp3HZUscLWE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=jcJh9MmFlBikpS/lE4brH2qEvClIGb5VcejU+CI8GscbXrF9H6sLeDvgIHzBUgks4 pv2x9cUM2tY+M2zMGwfPJ6JWNdo0xVete/zlq+xKUnRQ164/J+7sG9jd+0An17XtvB 8MIanVjoL5kyXGEwZ3ruTWMZjKBCCjEBIRdwyL0U2qITsHfYEJdsIpMnizZdswAble KDoQUE9ZYvlnS9rKK62JCqyjZHGU6/SuhzcmAUH8RR08HKEB04UsxlWDn7YQHLU322 sQ6MGTed+jiGuxdLeubnof5uHcXf78MI59aSl+AgCutH+0Dn8hx5qb43mIDV/C6NBR rld49fwDLA8aGz8Z0R696fkBGi6641M5klDTOsE5zXtQSZNMYWUQzamXA2Fd71kuIV czkjMOUd49lhStd1dgsg/Rl4MTxxYD796pazg6RQHrGvXEhWXmefoLAcKjzYl08piw OuwOK6ygnGy8rIZNNxER6GUAtjnfWPKQotBxSguMJPMsnP642FNTFtWF61VkztXv/S NADCgXUExHsMQRwido9Ijg4lkksNXx9u3vXHiyyX5mQKn0/XeQl1fv1fP/hi0tWY9K N7Lf1/bUHpEPJPA4dRXLha2ojenJdrli/hy1qcq7rqUOqJoMrdxi43aWchYWVDI7uN cMq5MoRB69Rajs73pfThxmQ0=
- In-reply-to: <CANXmBjy90HsG9_q1WyxL8=CxCCjPfWuOPU1gzoGpP58YpS0myg@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAJkPp5MhuH0TeS6XwKzzsEgPi8BPVshO92ugh+Sy-U3YOAinHA@mail.gmail.com> <CAJkPp5N8PV9-Hf5wijrJqKNZnjT0zzZy5VHng9+8tLQUt3-a8w@mail.gmail.com> <CANXmBjy90HsG9_q1WyxL8=CxCCjPfWuOPU1gzoGpP58YpS0myg@mail.gmail.com>
On Fri, Sep 29, 2023 at 09:06:16PM -0400, Charles Greathouse wrote:
> The implementation is straightforward:
>
> GEN
> bernpol_const(long k, GEN x)
> {
> GEN C, S;
> long i;
> pari_sp btop;
> constbern(k >> 1); /* cache B_2, ..., B_2[k/2] */
> C = vecbinomial(k);
> S = gen_0;
> btop = avma;
> for (i = 0; i <= k; ++i)
> {
> S = gadd(gmul(S, x), gmul(gel(C,i+1), bernfrac(i)));
> if (gc_needed(btop, 1)) S = gerepileuptoint(btop, S);
> }
> return S;
> }
But would that be any faster than subst(bernpol(k),'x, a) ?
That is the point.
Cheers,
Bill.