quad_roots: Compute the roots of a quadratic equation

View source: R/quad_roots.R

quad_rootsR Documentation

Compute the roots of a quadratic equation

Description

Compute the roots of a quadratic equation

Usage

quad_roots(a, b, c)

Arguments

a

coefficient of the quadratic term

b

coefficient of the linear term

c

coefficient of the constant term

Details

quad_roots computes the roots of a quadratic equation of the form ax^2 + bx + c = 0.

Value

vector with the two roots

Examples

    quad_roots(1, -8, 12)

PracTools documentation built on June 25, 2024, 1:12 a.m.