R/cusp.extrema.R

`cusp.extrema` <-
function (alpha, beta) 
{
    roots <- polyroot(c(alpha, beta, 0, -1))
    real <- abs(Im(roots)) < .Machine$double.eps^0.5
    if (all(real)) 
        sort(Re(roots))
    else rep(Re(roots[real]), 3)
}

Try the cusp package in your browser

Any scripts or data that you put into this service are public.

cusp documentation built on May 2, 2019, 6:51 p.m.