Average Error: 19.8 → 7.5
Time: 20.9s
Precision: 64
\[\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
\[\begin{array}{l} \mathbf{if}\;b \le -1.350676057343211554491874986591947593393 \cdot 10^{154}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \le -4.452231346955637703324616244948712027068 \cdot 10^{-267}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\frac{c \cdot \left(4 \cdot a\right)}{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \le 1.287594296476507417293820707954348336152 \cdot 10^{78}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\mathsf{fma}\left(a, c \cdot \left(-4\right), 0\right)}{b + \sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}} - b}{2}}{a}\\ \end{array}\]
\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\

\end{array}
\begin{array}{l}
\mathbf{if}\;b \le -1.350676057343211554491874986591947593393 \cdot 10^{154}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2}}{a}\\

\end{array}\\

\mathbf{elif}\;b \le -4.452231346955637703324616244948712027068 \cdot 10^{-267}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot c}{\frac{c \cdot \left(4 \cdot a\right)}{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)} - b}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\

\end{array}\\

\mathbf{elif}\;b \le 1.287594296476507417293820707954348336152 \cdot 10^{78}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\mathsf{fma}\left(a, c \cdot \left(-4\right), 0\right)}{b + \sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}}{2}}{a}\\

\end{array}\\

\mathbf{elif}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}} - b}{2}}{a}\\

\end{array}
double f(double a, double b, double c) {
        double r32193 = b;
        double r32194 = 0.0;
        bool r32195 = r32193 >= r32194;
        double r32196 = 2.0;
        double r32197 = c;
        double r32198 = r32196 * r32197;
        double r32199 = -r32193;
        double r32200 = r32193 * r32193;
        double r32201 = 4.0;
        double r32202 = a;
        double r32203 = r32201 * r32202;
        double r32204 = r32203 * r32197;
        double r32205 = r32200 - r32204;
        double r32206 = sqrt(r32205);
        double r32207 = r32199 - r32206;
        double r32208 = r32198 / r32207;
        double r32209 = r32199 + r32206;
        double r32210 = r32196 * r32202;
        double r32211 = r32209 / r32210;
        double r32212 = r32195 ? r32208 : r32211;
        return r32212;
}

double f(double a, double b, double c) {
        double r32213 = b;
        double r32214 = -1.3506760573432116e+154;
        bool r32215 = r32213 <= r32214;
        double r32216 = 0.0;
        bool r32217 = r32213 >= r32216;
        double r32218 = 2.0;
        double r32219 = c;
        double r32220 = r32218 * r32219;
        double r32221 = a;
        double r32222 = sqrt(r32213);
        double r32223 = r32221 / r32222;
        double r32224 = r32219 / r32222;
        double r32225 = r32223 * r32224;
        double r32226 = -2.0;
        double r32227 = r32213 * r32226;
        double r32228 = fma(r32225, r32218, r32227);
        double r32229 = r32220 / r32228;
        double r32230 = r32221 * r32219;
        double r32231 = r32230 / r32213;
        double r32232 = r32218 * r32231;
        double r32233 = r32232 - r32213;
        double r32234 = r32233 - r32213;
        double r32235 = r32234 / r32218;
        double r32236 = r32235 / r32221;
        double r32237 = r32217 ? r32229 : r32236;
        double r32238 = -4.452231346955638e-267;
        bool r32239 = r32213 <= r32238;
        double r32240 = 4.0;
        double r32241 = r32240 * r32221;
        double r32242 = r32219 * r32241;
        double r32243 = r32241 * r32219;
        double r32244 = -r32243;
        double r32245 = fma(r32213, r32213, r32244);
        double r32246 = sqrt(r32245);
        double r32247 = r32246 - r32213;
        double r32248 = r32242 / r32247;
        double r32249 = r32220 / r32248;
        double r32250 = r32213 * r32213;
        double r32251 = r32250 - r32243;
        double r32252 = sqrt(r32251);
        double r32253 = r32252 - r32213;
        double r32254 = r32253 / r32218;
        double r32255 = r32254 / r32221;
        double r32256 = r32217 ? r32249 : r32255;
        double r32257 = 1.2875942964765074e+78;
        bool r32258 = r32213 <= r32257;
        double r32259 = -r32213;
        double r32260 = r32259 - r32252;
        double r32261 = r32220 / r32260;
        double r32262 = -r32240;
        double r32263 = r32219 * r32262;
        double r32264 = 0.0;
        double r32265 = fma(r32221, r32263, r32264);
        double r32266 = r32213 + r32246;
        double r32267 = r32265 / r32266;
        double r32268 = r32267 / r32218;
        double r32269 = r32268 / r32221;
        double r32270 = r32217 ? r32261 : r32269;
        double r32271 = 3.0;
        double r32272 = pow(r32252, r32271);
        double r32273 = cbrt(r32272);
        double r32274 = r32273 - r32213;
        double r32275 = r32274 / r32218;
        double r32276 = r32275 / r32221;
        double r32277 = r32217 ? r32229 : r32276;
        double r32278 = r32258 ? r32270 : r32277;
        double r32279 = r32239 ? r32256 : r32278;
        double r32280 = r32215 ? r32237 : r32279;
        return r32280;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 4 regimes
  2. if b < -1.3506760573432116e+154

    1. Initial program 64.0

      \[\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Simplified64.0

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}}\]
    3. Taylor expanded around inf 64.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    4. Simplified64.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\mathsf{fma}\left(\frac{a \cdot c}{b}, 2, b \cdot -2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    5. Using strategy rm
    6. Applied add-sqr-sqrt64.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a \cdot c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    7. Applied times-frac64.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\color{blue}{\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    8. Taylor expanded around -inf 11.8

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2}}{a}\\ \end{array}\]

    if -1.3506760573432116e+154 < b < -4.452231346955638e-267

    1. Initial program 7.7

      \[\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Simplified7.7

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}}\]
    3. Using strategy rm
    4. Applied flip--7.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    5. Simplified7.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\frac{\color{blue}{0 + c \cdot \left(4 \cdot a\right)}}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    6. Simplified7.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\frac{0 + c \cdot \left(4 \cdot a\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)} - b}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]

    if -4.452231346955638e-267 < b < 1.2875942964765074e+78

    1. Initial program 9.5

      \[\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Simplified9.5

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrt9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} - b}{2}}{a}\\ \end{array}\]
    5. Applied sqrt-prod9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} - b}{2}}{a}\\ \end{array}\]
    6. Simplified9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} - b}{2}}{a}\\ \end{array}\]
    7. Simplified9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{2}}{a}\\ \end{array}\]
    8. Using strategy rm
    9. Applied flip--9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}\right) \cdot \left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}\right) - b \cdot b}{\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} + b}}{2}}{a}\\ \end{array}\]
    10. Simplified9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\mathsf{fma}\left(a, c \cdot \left(-4\right), 0\right)}{\sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} + b}}{2}}{a}\\ \end{array}\]
    11. Simplified9.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\mathsf{fma}\left(a, c \cdot \left(-4\right), 0\right)}{b + \sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}}{2}}{a}\\ \end{array}\]

    if 1.2875942964765074e+78 < b

    1. Initial program 27.8

      \[\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Simplified27.8

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}}\]
    3. Taylor expanded around inf 7.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    4. Simplified7.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\mathsf{fma}\left(\frac{a \cdot c}{b}, 2, b \cdot -2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    5. Using strategy rm
    6. Applied add-sqr-sqrt7.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a \cdot c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    7. Applied times-frac3.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\color{blue}{\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\]
    8. Using strategy rm
    9. Applied add-cbrt-cube3.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} - b}{2}}{a}\\ \end{array}\]
    10. Simplified3.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}} - b}{2}}{a}\\ \end{array}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification7.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \le -1.350676057343211554491874986591947593393 \cdot 10^{154}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \le -4.452231346955637703324616244948712027068 \cdot 10^{-267}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\frac{c \cdot \left(4 \cdot a\right)}{\sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \le 1.287594296476507417293820707954348336152 \cdot 10^{78}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\mathsf{fma}\left(a, c \cdot \left(-4\right), 0\right)}{b + \sqrt{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}}}{2}}{a}\\ \end{array}\\ \mathbf{elif}\;b \ge 0.0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(\frac{a}{\sqrt{b}} \cdot \frac{c}{\sqrt{b}}, 2, b \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}} - b}{2}}{a}\\ \end{array}\]

Reproduce

herbie shell --seed 2019303 +o rules:numerics
(FPCore (a b c)
  :name "jeff quadratic root 2"
  :precision binary64
  (if (>= b 0.0) (/ (* 2 c) (- (- b) (sqrt (- (* b b) (* (* 4 a) c))))) (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a))))