File: rtest_polynomialp.mac

package info (click to toggle)
maxima 5.42.1-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 150,192 kB
  • sloc: lisp: 382,565; fortran: 14,666; perl: 14,365; tcl: 11,123; sh: 4,622; makefile: 2,688; ansic: 444; xml: 23; awk: 17; sed: 17
file content (56 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
polynomialp(1,[x])$
true$

polynomialp(%pi,[x])$
true$

polynomialp(sqrt(23),[x])$
true$

polynomialp(1+x,[x])$
true$

polynomialp(1 + x * (sqrt(5) + x),[x])$
true$

polynomialp(1 + x * (sqrt(5) + x),[y])$
false$

polynomialp(1 + x * (sqrt(5) + y),[x,y])$
true$

polynomialp(1 + sqrt(x),[x], 'numberp, 'numberp);
true$

polynomialp(1 + sqrt(1 + sqrt(x)),[x], 'numberp, 'numberp);
true$

polynomialp(1 + sqrt(x + sqrt(1 + x*y)),[x,y], 'numberp, 'numberp);
true$

polynomialp(cos(x),[x]);
false$

polynomialp(cos(x),[x], 'numberp, 'numberp);
false$

polynomialp([x],[x], 'numberp, 'numberp);
false$

polynomialp((1+x)^a,[x], 'constantp, lambda([e],freeof(x,e)));
true$

polynomialp((1+x)^a,[x], 'constantp);
false$