UNPKG

379 Btext/coffeescriptView Raw
1test_coeff = ->
2 run_test [
3
4 "coeff(40*x^3+30*x^2+20*x+10,3)",
5 "40",
6
7 "coeff(40*x^3+30*x^2+20*x+10,2)",
8 "30",
9
10 "coeff(40*x^3+30*x^2+20*x+10,1)",
11 "20",
12
13 "coeff(40*x^3+30*x^2+20*x+10,0)",
14 "10",
15
16 "coeff(a*t^3+b*t^2+c*t+d,t,3)",
17 "a",
18
19 "coeff(a*t^3+b*t^2+c*t+d,t,2)",
20 "b",
21
22 "coeff(a*t^3+b*t^2+c*t+d,t,1)",
23 "c",
24
25 "coeff(a*t^3+b*t^2+c*t+d,t,0)",
26 "d",
27 ]