|
From: David S. <d.s...@go...> - 2025-04-24 14:42:41
|
Is z a literal z, or can it be any variable? If literal, try polynomialp(P, [z], 'numberp). Otherwise, get the list of vars using listofvars, check if its length is 1 and use that instead of [z]. Henry Baker <hb...@pi...> schrieb am Do., 24. Apr. 2025, 16:18: > Is there a simple way to "recognize" a polynomial P(z) in a variable 'z' > with *numerical* coefficients ? > > > I'd like to write a routine that errs out if the input isn't a polynomial; > if it has coefficients which aren't > > numerical; if it is a polynomial in the wrong variable, etc. > > > I don't mind if the polynomial is in factored form or expanded form, or > partially in between. > > > I don't mind if the polynomial has to be expanded in order to be > recognized. > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |