Quadratic roots, medium range

?

Percentage Accurate: 31.6% → 95.4%
Time: 21.3s
Precision: binary64
Cost: 40768

?

\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\mathsf{fma}\left(\frac{-0.25}{a}, {\left(a \cdot c\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (fma
  (/ -0.25 a)
  (* (pow (* a c) 4.0) (* 20.0 (pow b -7.0)))
  (-
   (* -2.0 (* (* (* c c) (* c (pow b -5.0))) (* a a)))
   (fma (/ c (/ (pow b 3.0) c)) a (/ c b)))))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
double code(double a, double b, double c) {
	return fma((-0.25 / a), (pow((a * c), 4.0) * (20.0 * pow(b, -7.0))), ((-2.0 * (((c * c) * (c * pow(b, -5.0))) * (a * a))) - fma((c / (pow(b, 3.0) / c)), a, (c / b))));
}
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function code(a, b, c)
	return fma(Float64(-0.25 / a), Float64((Float64(a * c) ^ 4.0) * Float64(20.0 * (b ^ -7.0))), Float64(Float64(-2.0 * Float64(Float64(Float64(c * c) * Float64(c * (b ^ -5.0))) * Float64(a * a))) - fma(Float64(c / Float64((b ^ 3.0) / c)), a, Float64(c / b))))
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
code[a_, b_, c_] := N[(N[(-0.25 / a), $MachinePrecision] * N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] * N[(20.0 * N[Power[b, -7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 * N[(N[(N[(c * c), $MachinePrecision] * N[(c * N[Power[b, -5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(c / N[(N[Power[b, 3.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] * a + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\mathsf{fma}\left(\frac{-0.25}{a}, {\left(a \cdot c\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right)

Local Percentage Accuracy?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 6 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each of Herbie's proposed alternatives. Up and to the right is better. Each dot represents an alternative program; the red square represents the initial program.

Bogosity?

Bogosity

Derivation?

  1. Initial program 33.1%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Simplified33.1%

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b}{a \cdot 2}} \]
    Step-by-step derivation

    [Start]33.1

    \[ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]

    *-commutative [=>]33.1

    \[ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]

    +-commutative [=>]33.1

    \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]

    unsub-neg [=>]33.1

    \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]

    fma-neg [=>]33.1

    \[ \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]

    associate-*l* [=>]33.1

    \[ \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{4 \cdot \left(a \cdot c\right)}\right)} - b}{a \cdot 2} \]

    *-commutative [=>]33.1

    \[ \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 4}\right)} - b}{a \cdot 2} \]

    distribute-rgt-neg-in [=>]33.1

    \[ \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-4\right)}\right)} - b}{a \cdot 2} \]

    metadata-eval [=>]33.1

    \[ \frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-4}\right)} - b}{a \cdot 2} \]
  3. Taylor expanded in b around inf 96.1%

    \[\leadsto \color{blue}{-1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + \left(-0.25 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot {b}^{7}} + \left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)} \]
  4. Simplified96.1%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-0.25}{a}, \frac{\left({c}^{4} \cdot {a}^{4}\right) \cdot 20}{{b}^{7}}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right)} \]
    Step-by-step derivation

    [Start]96.1

    \[ -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + \left(-0.25 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot {b}^{7}} + \left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]

    +-commutative [=>]96.1

    \[ \color{blue}{\left(-0.25 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot {b}^{7}} + \left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) + -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}} \]

    associate-+l+ [=>]96.1

    \[ \color{blue}{-0.25 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot {b}^{7}} + \left(\left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right) + -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right)} \]

    associate-*r/ [=>]96.1

    \[ \color{blue}{\frac{-0.25 \cdot \left({\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)\right)}{a \cdot {b}^{7}}} + \left(\left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right) + -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right) \]

    times-frac [=>]96.1

    \[ \color{blue}{\frac{-0.25}{a} \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}}} + \left(\left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right) + -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right) \]

    +-commutative [<=]96.1

    \[ \frac{-0.25}{a} \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}} + \color{blue}{\left(-1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + \left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)} \]

    fma-def [=>]96.1

    \[ \color{blue}{\mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}}, -1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + \left(-1 \cdot \frac{c}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)} \]
  5. Applied egg-rr95.8%

    \[\leadsto \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right)\right)} - 1}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
    Step-by-step derivation

    [Start]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, \frac{\left({c}^{4} \cdot {a}^{4}\right) \cdot 20}{{b}^{7}}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    expm1-log1p-u [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\left({c}^{4} \cdot {a}^{4}\right) \cdot 20}{{b}^{7}}\right)\right)}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    expm1-udef [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{e^{\mathsf{log1p}\left(\frac{\left({c}^{4} \cdot {a}^{4}\right) \cdot 20}{{b}^{7}}\right)} - 1}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    div-inv [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left(\color{blue}{\left(\left({c}^{4} \cdot {a}^{4}\right) \cdot 20\right) \cdot \frac{1}{{b}^{7}}}\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    associate-*l* [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left(\color{blue}{\left({c}^{4} \cdot {a}^{4}\right) \cdot \left(20 \cdot \frac{1}{{b}^{7}}\right)}\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    pow-prod-down [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left(\color{blue}{{\left(c \cdot a\right)}^{4}} \cdot \left(20 \cdot \frac{1}{{b}^{7}}\right)\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    pow-flip [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot \color{blue}{{b}^{\left(-7\right)}}\right)\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    metadata-eval [=>]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{\color{blue}{-7}}\right)\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
  6. Simplified96.1%

    \[\leadsto \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{{\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right)}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
    Step-by-step derivation

    [Start]95.8

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right)\right)} - 1, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    expm1-def [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right)\right)\right)}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    expm1-log1p [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, \color{blue}{{\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right)}, -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
  7. Applied egg-rr96.1%

    \[\leadsto \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right)} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
    Step-by-step derivation

    [Start]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    div-inv [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\color{blue}{\left({c}^{3} \cdot \frac{1}{{b}^{5}}\right)} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    unpow3 [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\color{blue}{\left(\left(c \cdot c\right) \cdot c\right)} \cdot \frac{1}{{b}^{5}}\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    associate-*l* [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot \frac{1}{{b}^{5}}\right)\right)} \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    pow-flip [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot \color{blue}{{b}^{\left(-5\right)}}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

    metadata-eval [=>]96.1

    \[ \mathsf{fma}\left(\frac{-0.25}{a}, {\left(c \cdot a\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{\color{blue}{-5}}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
  8. Final simplification96.1%

    \[\leadsto \mathsf{fma}\left(\frac{-0.25}{a}, {\left(a \cdot c\right)}^{4} \cdot \left(20 \cdot {b}^{-7}\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

Alternatives

Alternative 1
Accuracy93.9%
Cost20736
\[\left(\frac{-2 \cdot {c}^{3}}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}} \]
Alternative 2
Accuracy90.6%
Cost7232
\[\frac{c}{\frac{{b}^{3}}{c}} \cdot \left(-a\right) - \frac{c}{b} \]
Alternative 3
Accuracy90.2%
Cost1600
\[\left(-2 \cdot \left(\frac{c \cdot c}{\frac{b \cdot b}{a} \cdot \frac{b}{a}} + c \cdot \frac{a}{b}\right)\right) \cdot \frac{0.5}{a} \]
Alternative 4
Accuracy81.1%
Cost256
\[\frac{-c}{b} \]
Alternative 5
Accuracy3.2%
Cost64
\[0 \]

Reproduce?

herbie shell --seed 2023160 
(FPCore (a b c)
  :name "Quadratic roots, medium range"
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))