powered by
Find the zeros of a quadratic equation.
quadratic(b2, b1, b0)quadratic2(b2, b1, b0)
quadratic2(b2, b1, b0)
the coefficient of the x^2 term
the coefficient of the x term
the constant term
numeric vector of solutions to the equation
quadratic and quadratic2 implement the quadratic equation from standard algebra in two different ways. The quadratic function is susceptible to cascading numerical error and the quadratic2 has reduced potential error.
quadratic
quadratic2
Other algebra: bilinear(), cubicspline(), division, fibonacci(), horner(), isPrime(), linterp(), nthroot(), polyinterp(), pwiselinterp()
bilinear()
cubicspline()
division
fibonacci()
horner()
isPrime()
linterp()
nthroot()
polyinterp()
pwiselinterp()
# NOT RUN { quadratic(1, 0, -1) quadratic(4, -4, 1) quadratic2(1, 0, -1) quadratic2(4, -4, 1) # }
Run the code above in your browser using DataLab