[R] Discriminant of a cubic polynomial

tgs77m m@iii@g oii y@hoo@com tgs77m m@iii@g oii y@hoo@com
Wed Oct 9 18:35:34 CEST 2024


Colleagues

Given the coefficients of a cubic polynomial, a,b,c,d and
using

discriminant_cubic <- function(a, b, c, d) {
  D <- 18 * a * b * c * d - 4 * b^3 * d + b^2 * c^2 - 4 * a * c^2 - 27 * a^2
* d^2
  return(D)
}

I can find the discriminant of a cubic polynomial.
Is there an R package which can do this?

Thomas Subia



More information about the R-help mailing list