Karim Belabas on Sat, 30 Sep 2023 10:01:05 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: evaluation of Bernoulli polynomials


* Max Alekseyev [2023-09-29 23:45]:
> Most named polynomials in PARI allow upfront evaluation at a given point -
> like
> 
> ? polcyclo(7,2)
> %1 = 127
> ? polchebyshev(7,2)
> %2 = 128*x^7 - 192*x^5 + 80*x^3 - 8*x
> 
> However, this is not the case with Bernoulli polynomials:
> 
> ? bernpol(7,2)
>   ***   variable name expected: bernpol(7,2)
>   ***                                     ^--
> 
> Can this be fixed please?

It's not very useful because there's no faster way to evaluate Bernoulli
polynomials than to ... compute then evaluate them. But it doesn't hurt
and is easy to do.

I'm neutral. Other opinions ?

> PS. On a cosmetic side, bernpol() should have been better called polbern()
> to be consistent with naming of other pol*() functions.

It's been called bernpol() to be consistent with other bern*() functions ...
The other choice would have been called polbernoulli(), but the
interface was indeed not consistent with pol* functions.

Cheers,

    K.B.
-- 
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/