/usr/lib/pd/extra/zexy/polyfun.pd is in pd-zexy 2.2.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | #N canvas 532 58 492 526 10;
#X obj 97 112 inlet x;
#X obj 97 437 outlet y=a0+a1*x+a2*x^2+a3*x^3+...;
#X obj 97 415 f;
#X obj 119 335 +;
#X obj 119 302 * 1;
#X obj 97 133 t b b f;
#X obj 119 195 t l f;
#X obj 199 111 inlet coefficients;
#X obj 119 173 list;
#X text 36 29 the right inlet takes the coefficients a0...aN \; whenever
a value 'x' appears on the left inlet \, 'y' is calculated by:;
#X text 96 68 y=a0+a1*x+a2*x^2+...+aN*x^N;
#X text 93 14 polynomial function of order N;
#X text 11 86 N is determined at execution time (depending on length
of coeff-list).;
#N canvas 0 0 543 426 repack 0;
#X obj 158 194 list split 1;
#X obj 158 284 list;
#X obj 158 305 route list float;
#X obj 211 331 t l;
#X obj 119 126 list split 1;
#X obj 188 241 outlet;
#X obj 119 65 inlet;
#X text 137 110 discard the 1st element (it is extracted outside);
#X obj 158 218 t b f;
#X connect 0 0 8 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 3 0;
#X connect 3 0 0 0;
#X connect 4 1 0 0;
#X connect 6 0 4 0;
#X connect 8 0 1 0;
#X connect 8 1 5 0;
#X restore 119 220 pd repack 1;
#N canvas 0 0 450 300 x^n 0;
#X obj 158 203 * 1;
#X obj 158 225 t f f;
#X obj 158 182 f;
#X msg 204 178 1;
#X obj 174 157 t f b;
#X obj 158 123 inlet bang;
#X obj 249 123 inlet x;
#X obj 158 250 outlet;
#X connect 0 0 1 0;
#X connect 1 0 7 0;
#X connect 1 1 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 4 0 2 1;
#X connect 4 1 3 0;
#X connect 5 0 2 0;
#X connect 6 0 4 0;
#X restore 149 273 pd x^n;
#X obj 119 249 t f b;
#X text 148 314 an*x^n;
#X text 147 349 sum;
#X obj 119 382 t f f;
#X connect 0 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 18 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X connect 5 1 8 0;
#X connect 5 2 14 1;
#X connect 6 0 13 0;
#X connect 6 1 3 1;
#X connect 7 0 8 1;
#X connect 8 0 6 0;
#X connect 13 0 15 0;
#X connect 14 0 4 1;
#X connect 15 0 4 0;
#X connect 15 1 14 0;
#X connect 18 0 2 1;
#X connect 18 1 3 1;
|