UNPKG

323 Btext/coffeescriptView Raw
1test_nroots = ->
2 run_test [
3 "nroots(x)",
4 "0",
5
6 "nroots((1+i)*x^2+1)",
7 "[-0.17178-0.727673*i,0.17178+0.727673*i]",
8
9 "nroots(sqrt(2)*exp(i*pi/4)*x^2+1)",
10 "[-0.17178-0.727673*i,0.17178+0.727673*i]",
11
12 # "nroots(x^4+1)",
13 # "(-0.707107+0.707107*i,-0.707107-0.707107*i,0.707107+0.707107*i,0.707107-0.707107*i)",
14 ]