| Karim Belabas on Wed, 23 Mar 2016 12:10:40 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Proposal to extend primes() |
* Jeroen Demeyer [2016-03-23 12:04]:
> On 2016-03-16 10:32, Karim Belabas wrote:
> >Currently a single argument describes the interval (as in e.g. polrealroots),
>
> I guess you mean polsturm().
polrootsreal(), sorry. (Which covers polsturm() as well.)
> But that actually does support polsturm(pol, a, b) as well as
> polsturm(pol, [a,b]). So the following are equivalent:
>
> gp> polsturm(x^3+1,[-oo,1])
> %1 = 1
> gp> polsturm(x^3+1,,1)
> %2 = 1
We still support the old syntax in %2, but it is now deprecated (and no longer
documented):
(12:06) gp > ??polsturm
polsturm(T,{ab}):
Number of real roots of the real squarefree polynomial T. If the argument ab
is present, it must be a vector [a,b] with two real components (of type t_INT,
t_REAL, t_FRAC or t_INFINITY) and we count roots belonging to that closed
interval. [...]
(12:07) gp > ??polrootsreal
polrootsreal(T, {ab}):
Real roots of the polynomial T with rational coefficients, multiple roots
being included according to their multiplicity. The roots are given to a
relative accuracy of realprecision. If argument ab is present, it must be a
vector [a,b] with two components (of type t_INT, t_FRAC or t_INFINITY) and we
restrict to roots belonging to that closed interval. [...]
etc.
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]
`