Roots of a quadratic function: Difference between revisions
Content added Content deleted
m (→{{header|R}}) |
m (→{{header|R}}) |
||
Line 1,849: | Line 1,849: | ||
Using the builtin '''polyroot''' function (note the order of coefficients is reversed): |
Using the builtin '''polyroot''' function (note the order of coefficients is reversed): |
||
<lang R>polyroot(c( |
<lang R>polyroot(c(2i, 0, 1)) |
||
[1] |
[1] -1+1i 1-1i |
||
polyroot(c(1, -1e9, 1)) |
polyroot(c(1, -1e9, 1)) |