|
From: Henry B. <hb...@pi...> - 2025-04-24 15:33:29
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>'polynomialp' looks great -- I thought I had already queried for
built-in functions, but I don't recall that one popping up.</p>
<p>Thanks!<br>
</p>
<div class="moz-cite-prefix">On 4/24/25 07:42, David Scherfgen
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAM...@ma...">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Is z a literal z, or can it be any variable?
<p dir="ltr">
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].</p>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">Henry Baker <<a
href="mailto:hb...@pi..." moz-do-not-send="true"
class="moz-txt-link-freetext">hb...@pi...</a>>
schrieb am Do., 24. Apr. 2025, 16:18:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Is there a simple way to "recognize" a polynomial P(z) in
a variable 'z' with *numerical* coefficients ?<br>
</p>
<p><br>
</p>
<p>I'd like to write a routine that errs out if the input
isn't a polynomial; if it has coefficients which aren't</p>
<p>numerical; if it is a polynomial in the wrong variable,
etc.</p>
<p><br>
</p>
<p>I don't mind if the polynomial is in factored form or
expanded form, or partially in between.</p>
<p><br>
</p>
<p>I don't mind if the polynomial has to be expanded in
order to be recognized.</p>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>
|