Published
Edited
Nov 3, 2021
Insert cell
Insert cell
Insert cell
quad = (a, b, c) => {
const discriminant = pow(b, 2) - 4 * a * c;
return discriminant < 0 ? null : [-1, 1].map(s => (-b + sqrt(discriminant) * s) / (2 * a));
}
Insert cell
q = quad(4.9, 8, -300)
Insert cell
pow = Math.pow
Insert cell
sqrt = Math.sqrt
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more