Quadratic Discriminant Calculator
Compute the discriminant of a quadratic equation and the nature of its roots.
📐 計算公式
一元二次判別式(本頁程式碼口徑):Δ=b²−4ac;頂點橫座標=−b÷(2a)(a≠0 時輸出)。校驗:三項必填且為有效數值(0 合法,a=0 時按非二次方程提示)。判據:a=0 判「不是二次方程」;Δ 恰為 0 判兩個相等實根;否則用隨係數尺度變化的容差 tol=max((b²+|4ac|)×10⁻¹², Number.MIN_VALUE)——|Δ|≤tol 時標「Δ 在數值精度內接近 0,可能為重根,需高精度核驗」(不給出確定結論),Δ>tol 兩個不等實根,Δ<−tol 無實根。判別式按量級顯示:常規兩位小數,極小/極大用 4 位科學計數,避免 1e−14 被顯示成 0.00 後誤判。
輸入二次項係數 a、b、c,求判別式。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Discriminant | Delta = b^2 - 4ac for the equation ax^2 + bx + c = 0 | ISO 80000-2:2019, Quantities and units - Part 2: Mathematics |
| Number of real roots | Delta > 0: two distinct real roots; Delta = 0: a repeated real root; Delta < 0: no real roots | ISO 80000-2:2019, Quantities and units - Part 2: Mathematics |
| Quadratic formula | x = ( -b ± sqrt(Delta) ) / (2a) | ISO 80000-2:2019, Quantities and units - Part 2: Mathematics |
| Viete formulas | x1 + x2 = -b/a; x1 · x2 = c/a | Viete F. (1591), In artem analyticem isagoge |
📌 計算說明
- Δ>0 兩實根,Δ=0 重根,Δ<0 復根。
- (−3)²−8 → 1。