Quadratic roots, narrow range

Percentage Accurate: 55.5% → 91.3%
Time: 12.6s
Alternatives: 13
Speedup: TODO×

Specification

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

Local Percentage Accuracy vs ?

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.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Alternative 1?

\[\begin{array}{l} t_0 := {\left(a \cdot c\right)}^{2}\\ t_1 := {\left(a \cdot c\right)}^{4}\\ \frac{1}{\frac{a}{b} + \mathsf{fma}\left(-2, \frac{c \cdot \left(a \cdot a\right)}{\frac{{b}^{3}}{-0.5}}, \frac{-2 \cdot \left(\mathsf{fma}\left(-0.125, \frac{\mathsf{fma}\left(16, t_1, 4 \cdot t_1\right)}{c \cdot \left(a \cdot c\right)}, a \cdot t_0\right) - a \cdot \left(-0.5 \cdot t_0\right)\right)}{{b}^{5}} - \frac{b}{c}\right)} \end{array} \]
Derivation
  1. Initial program 55.8%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. add-log-exp51.1%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
    2. neg-mul-151.1%

      \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
    3. fma-def51.1%

      \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
    4. *-commutative51.1%

      \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
    5. *-commutative51.1%

      \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
    6. *-commutative51.1%

      \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
  3. Applied egg-rr51.1%

    \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
  4. Step-by-step derivation
    1. add-log-exp55.8%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
    2. clear-num55.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
  5. Applied egg-rr55.9%

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

    \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + \left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{-1 \cdot \left(c \cdot \left(\left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right) \cdot a\right)\right) + \left({c}^{2} \cdot {a}^{3} + -0.125 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{c}^{2} \cdot a}\right)}{{b}^{5}}\right)\right)}} \]
  7. Step-by-step derivation
    1. Simplified91.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \mathsf{fma}\left(-2, \frac{c \cdot \left(a \cdot a\right)}{\frac{{b}^{3}}{-0.5}}, \frac{-2 \cdot \left(\mathsf{fma}\left(-0.125, \frac{\mathsf{fma}\left(16, {\left(c \cdot a\right)}^{4}, 4 \cdot {\left(c \cdot a\right)}^{4}\right)}{c \cdot \left(c \cdot a\right)}, a \cdot {\left(c \cdot a\right)}^{2}\right) - a \cdot \left({\left(c \cdot a\right)}^{2} \cdot -0.5\right)\right)}{{b}^{5}} - \frac{b}{c}\right)}} \]
    2. Final simplification91.6%

      \[\leadsto \frac{1}{\frac{a}{b} + \mathsf{fma}\left(-2, \frac{c \cdot \left(a \cdot a\right)}{\frac{{b}^{3}}{-0.5}}, \frac{-2 \cdot \left(\mathsf{fma}\left(-0.125, \frac{\mathsf{fma}\left(16, {\left(a \cdot c\right)}^{4}, 4 \cdot {\left(a \cdot c\right)}^{4}\right)}{c \cdot \left(a \cdot c\right)}, a \cdot {\left(a \cdot c\right)}^{2}\right) - a \cdot \left(-0.5 \cdot {\left(a \cdot c\right)}^{2}\right)\right)}{{b}^{5}} - \frac{b}{c}\right)} \]

    Alternative 2?

    \[\mathsf{fma}\left(-0.25, \frac{{\left(a \cdot c\right)}^{4}}{{b}^{7}} \cdot \frac{20}{a}, -2 \cdot \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - \frac{c \cdot c}{\frac{{b}^{3}}{a}} \]
    Derivation
    1. Initial program 55.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. add-log-exp51.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
      2. neg-mul-151.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
      3. fma-def51.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
      4. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
      5. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
      6. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
    3. Applied egg-rr51.1%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
    4. Taylor expanded in b around inf 91.3%

      \[\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)} \]
    5. Step-by-step derivation
      1. +-commutative91.3%

        \[\leadsto \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}}} \]
      2. mul-1-neg91.3%

        \[\leadsto \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) + \color{blue}{\left(-\frac{{c}^{2} \cdot a}{{b}^{3}}\right)} \]
      3. unpow291.3%

        \[\leadsto \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) + \left(-\frac{\color{blue}{\left(c \cdot c\right)} \cdot a}{{b}^{3}}\right) \]
      4. unsub-neg91.3%

        \[\leadsto \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) - \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}}} \]
    6. Simplified91.3%

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

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

    Alternative 3?

    \[\begin{array}{l} t_0 := b \cdot b - c \cdot \left(a \cdot 4\right)\\ t_1 := \sqrt{t_0}\\ \mathbf{if}\;\frac{t_1 - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {t_0}^{1.5}}{{\left(-b\right)}^{2} + \left(t_0 + b \cdot t_1\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -5

      1. Initial program 87.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. flip3-+87.1%

          \[\leadsto \frac{\color{blue}{\frac{{\left(-b\right)}^{3} + {\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}}{2 \cdot a} \]
        2. pow1/287.1%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\color{blue}{\left({\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{0.5}\right)}}^{3}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
        3. pow-pow89.8%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + \color{blue}{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\left(0.5 \cdot 3\right)}}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
        4. *-commutative89.8%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left(b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}\right)}^{\left(0.5 \cdot 3\right)}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
        5. *-commutative89.8%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left(b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}\right)}^{\left(0.5 \cdot 3\right)}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
        6. metadata-eval89.8%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\color{blue}{1.5}}}{\left(-b\right) \cdot \left(-b\right) + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
        7. pow289.8%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{3} + {\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}{\color{blue}{{\left(-b\right)}^{2}} + \left(\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) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
      3. Applied egg-rr89.8%

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

      if -5 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

      1. Initial program 52.8%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp51.0%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-151.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def51.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr51.0%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp52.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num52.8%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr52.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + -1 \cdot \frac{b}{c}\right)}} \]
      7. Step-by-step derivation
        1. +-commutative90.6%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}} \]
        2. associate-+r+90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} + -1 \cdot \frac{b}{c}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}}} \]
        3. mul-1-neg90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        4. unsub-neg90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right)} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        5. associate-*r/90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2 \cdot \left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right)}{{b}^{3}}}} \]
        6. associate-/l*90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2}{\frac{{b}^{3}}{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        7. distribute-rgt-out90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(0.5 + -1\right)}}}} \]
        8. metadata-eval90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot {a}^{2}\right) \cdot \color{blue}{-0.5}}}} \]
        9. *-commutative90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{-0.5 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        10. unpow290.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \color{blue}{\left(a \cdot a\right)}\right)}}} \]
      8. Simplified90.6%

        \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \left(a \cdot a\right)\right)}}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{3} + {\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}{{\left(-b\right)}^{2} + \left(\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right) + b \cdot \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]

    Alternative 4?

    \[\begin{array}{l} t_0 := c \cdot \left(a \cdot 4\right)\\ t_1 := \sqrt{b \cdot b - t_0}\\ \mathbf{if}\;\frac{t_1 - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{2} + \left(t_0 - b \cdot b\right)}{\left(-b\right) - t_1}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -5

      1. Initial program 87.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. flip-+86.6%

          \[\leadsto \frac{\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}}}}{2 \cdot a} \]
        2. pow286.6%

          \[\leadsto \frac{\frac{\color{blue}{{\left(-b\right)}^{2}} - \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}}}{2 \cdot a} \]
        3. add-sqr-sqrt89.3%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \color{blue}{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a} \]
        4. *-commutative89.3%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a} \]
        5. *-commutative89.3%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a} \]
        6. *-commutative89.3%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}}}{2 \cdot a} \]
        7. *-commutative89.3%

          \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}}}{2 \cdot a} \]
      3. Applied egg-rr89.3%

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

      if -5 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

      1. Initial program 52.8%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp51.0%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-151.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def51.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr51.0%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp52.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num52.8%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr52.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + -1 \cdot \frac{b}{c}\right)}} \]
      7. Step-by-step derivation
        1. +-commutative90.6%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}} \]
        2. associate-+r+90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} + -1 \cdot \frac{b}{c}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}}} \]
        3. mul-1-neg90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        4. unsub-neg90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right)} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        5. associate-*r/90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2 \cdot \left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right)}{{b}^{3}}}} \]
        6. associate-/l*90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2}{\frac{{b}^{3}}{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        7. distribute-rgt-out90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(0.5 + -1\right)}}}} \]
        8. metadata-eval90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot {a}^{2}\right) \cdot \color{blue}{-0.5}}}} \]
        9. *-commutative90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{-0.5 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        10. unpow290.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \color{blue}{\left(a \cdot a\right)}\right)}}} \]
      8. Simplified90.6%

        \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \left(a \cdot a\right)\right)}}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\frac{{\left(-b\right)}^{2} + \left(c \cdot \left(a \cdot 4\right) - b \cdot b\right)}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]

    Alternative 5?

    \[\begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ \mathbf{if}\;\frac{t_0 - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{1}{\left(a \cdot 2\right) \cdot \frac{1}{\mathsf{fma}\left(-1, b, t_0\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -5

      1. Initial program 87.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp52.3%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-152.3%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def52.3%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr52.3%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp87.0%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num87.0%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr87.0%

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

          \[\leadsto \frac{1}{\color{blue}{\left(a \cdot 2\right) \cdot \frac{1}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      7. Applied egg-rr87.1%

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

      if -5 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

      1. Initial program 52.8%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp51.0%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-151.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def51.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr51.0%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp52.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num52.8%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr52.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + -1 \cdot \frac{b}{c}\right)}} \]
      7. Step-by-step derivation
        1. +-commutative90.6%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}} \]
        2. associate-+r+90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} + -1 \cdot \frac{b}{c}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}}} \]
        3. mul-1-neg90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        4. unsub-neg90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right)} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        5. associate-*r/90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2 \cdot \left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right)}{{b}^{3}}}} \]
        6. associate-/l*90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2}{\frac{{b}^{3}}{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        7. distribute-rgt-out90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(0.5 + -1\right)}}}} \]
        8. metadata-eval90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot {a}^{2}\right) \cdot \color{blue}{-0.5}}}} \]
        9. *-commutative90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{-0.5 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        10. unpow290.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \color{blue}{\left(a \cdot a\right)}\right)}}} \]
      8. Simplified90.6%

        \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \left(a \cdot a\right)\right)}}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{1}{\left(a \cdot 2\right) \cdot \frac{1}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]

    Alternative 6?

    \[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -5

      1. Initial program 87.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. *-commutative87.0%

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

          \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]
        3. unsub-neg87.0%

          \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]
        4. fma-neg87.0%

          \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]
        5. associate-*l*87.0%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{4 \cdot \left(a \cdot c\right)}\right)} - b}{a \cdot 2} \]
        6. *-commutative87.0%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 4}\right)} - b}{a \cdot 2} \]
        7. distribute-rgt-neg-in87.0%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-4\right)}\right)} - b}{a \cdot 2} \]
        8. metadata-eval87.0%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-4}\right)} - b}{a \cdot 2} \]
      3. Simplified87.0%

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

      if -5 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

      1. Initial program 52.8%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp51.0%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-151.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def51.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr51.0%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp52.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num52.8%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr52.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + -1 \cdot \frac{b}{c}\right)}} \]
      7. Step-by-step derivation
        1. +-commutative90.6%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}} \]
        2. associate-+r+90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} + -1 \cdot \frac{b}{c}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}}} \]
        3. mul-1-neg90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        4. unsub-neg90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right)} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        5. associate-*r/90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2 \cdot \left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right)}{{b}^{3}}}} \]
        6. associate-/l*90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2}{\frac{{b}^{3}}{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        7. distribute-rgt-out90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(0.5 + -1\right)}}}} \]
        8. metadata-eval90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot {a}^{2}\right) \cdot \color{blue}{-0.5}}}} \]
        9. *-commutative90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{-0.5 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        10. unpow290.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \color{blue}{\left(a \cdot a\right)}\right)}}} \]
      8. Simplified90.6%

        \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \left(a \cdot a\right)\right)}}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]

    Alternative 7?

    \[\begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\\ \mathbf{if}\;\frac{t_0}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{1}{\frac{a \cdot 2}{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -5

      1. Initial program 87.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp52.3%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-152.3%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def52.3%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative52.3%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr52.3%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp87.0%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num87.0%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr87.0%

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

          \[\leadsto \frac{1}{\frac{a \cdot 2}{\color{blue}{-1 \cdot b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}}} \]
        2. neg-mul-187.0%

          \[\leadsto \frac{1}{\frac{a \cdot 2}{\color{blue}{\left(-b\right)} + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}} \]
      7. Applied egg-rr87.0%

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

      if -5 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

      1. Initial program 52.8%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp51.0%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-151.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def51.0%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative51.0%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr51.0%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp52.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num52.8%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr52.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + \left(-2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + -1 \cdot \frac{b}{c}\right)}} \]
      7. Step-by-step derivation
        1. +-commutative90.6%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-1 \cdot \frac{b}{c} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}} \]
        2. associate-+r+90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} + -1 \cdot \frac{b}{c}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}}} \]
        3. mul-1-neg90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}\right) + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        4. unsub-neg90.6%

          \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right)} + -2 \cdot \frac{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}} \]
        5. associate-*r/90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2 \cdot \left(0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)\right)}{{b}^{3}}}} \]
        6. associate-/l*90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \color{blue}{\frac{-2}{\frac{{b}^{3}}{0.5 \cdot \left(c \cdot {a}^{2}\right) + -1 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        7. distribute-rgt-out90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(0.5 + -1\right)}}}} \]
        8. metadata-eval90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot {a}^{2}\right) \cdot \color{blue}{-0.5}}}} \]
        9. *-commutative90.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\color{blue}{-0.5 \cdot \left(c \cdot {a}^{2}\right)}}}} \]
        10. unpow290.6%

          \[\leadsto \frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \color{blue}{\left(a \cdot a\right)}\right)}}} \]
      8. Simplified90.6%

        \[\leadsto \frac{1}{\color{blue}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{-0.5 \cdot \left(c \cdot \left(a \cdot a\right)\right)}}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification90.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -5:\\ \;\;\;\;\frac{1}{\frac{a \cdot 2}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(\frac{a}{b} - \frac{b}{c}\right) + \frac{-2}{\frac{{b}^{3}}{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.5}}}\\ \end{array} \]

    Alternative 8?

    \[\begin{array}{l} \mathbf{if}\;b \leq 5:\\ \;\;\;\;\frac{1}{\frac{a \cdot 2}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if b < 5

      1. Initial program 81.7%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp74.4%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-174.4%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def74.4%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative74.4%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative74.4%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative74.4%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr74.4%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp81.7%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num81.7%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr81.7%

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

          \[\leadsto \frac{1}{\frac{a \cdot 2}{\color{blue}{-1 \cdot b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}}} \]
        2. neg-mul-181.7%

          \[\leadsto \frac{1}{\frac{a \cdot 2}{\color{blue}{\left(-b\right)} + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}} \]
      7. Applied egg-rr81.7%

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

      if 5 < b

      1. Initial program 48.1%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp44.1%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-144.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def44.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr44.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp48.1%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num48.1%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr48.1%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + -1 \cdot \frac{b}{c}}} \]
      7. Step-by-step derivation
        1. mul-1-neg87.4%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}} \]
        2. unsub-neg87.4%

          \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
      8. Simplified87.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.1%

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

    Alternative 9?

    \[\begin{array}{l} \mathbf{if}\;b \leq 5:\\ \;\;\;\;\left(\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -4} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if b < 5

      1. Initial program 81.7%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. /-rgt-identity81.7%

          \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{\frac{2 \cdot a}{1}}} \]
        2. metadata-eval81.7%

          \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\frac{2 \cdot a}{\color{blue}{--1}}} \]
        3. associate-/l*81.7%

          \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{2 \cdot a}} \]
        4. associate-*r/81.7%

          \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{2 \cdot a}} \]
        5. +-commutative81.7%

          \[\leadsto \color{blue}{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)\right)} \cdot \frac{--1}{2 \cdot a} \]
        6. unsub-neg81.7%

          \[\leadsto \color{blue}{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b\right)} \cdot \frac{--1}{2 \cdot a} \]
        7. fma-neg81.8%

          \[\leadsto \left(\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b\right) \cdot \frac{--1}{2 \cdot a} \]
        8. associate-*l*81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{4 \cdot \left(a \cdot c\right)}\right)} - b\right) \cdot \frac{--1}{2 \cdot a} \]
        9. *-commutative81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 4}\right)} - b\right) \cdot \frac{--1}{2 \cdot a} \]
        10. distribute-rgt-neg-in81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-4\right)}\right)} - b\right) \cdot \frac{--1}{2 \cdot a} \]
        11. metadata-eval81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-4}\right)} - b\right) \cdot \frac{--1}{2 \cdot a} \]
        12. associate-/r*81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b\right) \cdot \color{blue}{\frac{\frac{--1}{2}}{a}} \]
        13. metadata-eval81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b\right) \cdot \frac{\frac{\color{blue}{1}}{2}}{a} \]
        14. metadata-eval81.8%

          \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b\right) \cdot \frac{\color{blue}{0.5}}{a} \]
      3. Simplified81.8%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}} \]
      4. Step-by-step derivation
        1. fma-udef81.7%

          \[\leadsto \left(\sqrt{\color{blue}{b \cdot b + \left(a \cdot c\right) \cdot -4}} - b\right) \cdot \frac{0.5}{a} \]
        2. *-commutative81.7%

          \[\leadsto \left(\sqrt{b \cdot b + \color{blue}{-4 \cdot \left(a \cdot c\right)}} - b\right) \cdot \frac{0.5}{a} \]
      5. Applied egg-rr81.7%

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

      if 5 < b

      1. Initial program 48.1%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp44.1%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-144.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def44.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr44.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp48.1%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num48.1%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr48.1%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + -1 \cdot \frac{b}{c}}} \]
      7. Step-by-step derivation
        1. mul-1-neg87.4%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}} \]
        2. unsub-neg87.4%

          \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
      8. Simplified87.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5:\\ \;\;\;\;\left(\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -4} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]

    Alternative 10?

    \[\begin{array}{l} \mathbf{if}\;b \leq 5:\\ \;\;\;\;\frac{\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -4} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]
    Derivation
    1. Split input into 2 regimes
    2. if b < 5

      1. Initial program 81.7%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. *-commutative81.7%

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

          \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]
        3. unsub-neg81.7%

          \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]
        4. fma-neg81.8%

          \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]
        5. associate-*l*81.8%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{4 \cdot \left(a \cdot c\right)}\right)} - b}{a \cdot 2} \]
        6. *-commutative81.8%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, -\color{blue}{\left(a \cdot c\right) \cdot 4}\right)} - b}{a \cdot 2} \]
        7. distribute-rgt-neg-in81.8%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot \left(-4\right)}\right)} - b}{a \cdot 2} \]
        8. metadata-eval81.8%

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot \color{blue}{-4}\right)} - b}{a \cdot 2} \]
      3. Simplified81.8%

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

          \[\leadsto \left(\sqrt{\color{blue}{b \cdot b + \left(a \cdot c\right) \cdot -4}} - b\right) \cdot \frac{0.5}{a} \]
        2. *-commutative81.7%

          \[\leadsto \left(\sqrt{b \cdot b + \color{blue}{-4 \cdot \left(a \cdot c\right)}} - b\right) \cdot \frac{0.5}{a} \]
      5. Applied egg-rr81.7%

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

      if 5 < b

      1. Initial program 48.1%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. add-log-exp44.1%

          \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
        2. neg-mul-144.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
        3. fma-def44.1%

          \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
        4. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
        5. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
        6. *-commutative44.1%

          \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
      3. Applied egg-rr44.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
      4. Step-by-step derivation
        1. add-log-exp48.1%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
        2. clear-num48.1%

          \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
      5. Applied egg-rr48.1%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + -1 \cdot \frac{b}{c}}} \]
      7. Step-by-step derivation
        1. mul-1-neg87.4%

          \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}} \]
        2. unsub-neg87.4%

          \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
      8. Simplified87.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification86.1%

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

    Alternative 11?

    \[\frac{1}{\frac{a}{b} - \frac{b}{c}} \]
    Derivation
    1. Initial program 55.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. add-log-exp51.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
      2. neg-mul-151.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
      3. fma-def51.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
      4. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
      5. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
      6. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
    3. Applied egg-rr51.1%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
    4. Step-by-step derivation
      1. add-log-exp55.8%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}} \]
      2. clear-num55.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 2}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}}} \]
    5. Applied egg-rr55.9%

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

      \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} + -1 \cdot \frac{b}{c}}} \]
    7. Step-by-step derivation
      1. mul-1-neg81.6%

        \[\leadsto \frac{1}{\frac{a}{b} + \color{blue}{\left(-\frac{b}{c}\right)}} \]
      2. unsub-neg81.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
    8. Simplified81.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{a}{b} - \frac{b}{c}}} \]
    9. Final simplification81.6%

      \[\leadsto \frac{1}{\frac{a}{b} - \frac{b}{c}} \]

    Alternative 12?

    \[\frac{-c}{b} \]
    Derivation
    1. Initial program 55.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. neg-sub055.8%

        \[\leadsto \frac{\color{blue}{\left(0 - b\right)} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. associate-+l-55.8%

        \[\leadsto \frac{\color{blue}{0 - \left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
      3. sub0-neg55.8%

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
      4. neg-mul-155.8%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a} \]
      5. associate-*l/55.8%

        \[\leadsto \color{blue}{\frac{-1}{2 \cdot a} \cdot \left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)} \]
      6. *-commutative55.8%

        \[\leadsto \color{blue}{\left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \frac{-1}{2 \cdot a}} \]
      7. associate-/r*55.8%

        \[\leadsto \left(b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \color{blue}{\frac{\frac{-1}{2}}{a}} \]
      8. /-rgt-identity55.8%

        \[\leadsto \color{blue}{\frac{b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{1}} \cdot \frac{\frac{-1}{2}}{a} \]
      9. metadata-eval55.8%

        \[\leadsto \frac{b - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{--1}} \cdot \frac{\frac{-1}{2}}{a} \]
    3. Simplified55.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/63.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. neg-mul-163.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    6. Simplified63.4%

      \[\leadsto \color{blue}{\frac{-c}{b}} \]
    7. Final simplification63.4%

      \[\leadsto \frac{-c}{b} \]

    Alternative 13?

    \[\frac{0}{a} \]
    Derivation
    1. Initial program 55.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. add-log-exp51.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right)} \]
      2. neg-mul-151.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{-1 \cdot b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\right) \]
      3. fma-def51.1%

        \[\leadsto \log \left(e^{\frac{\color{blue}{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}}\right) \]
      4. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right)}{2 \cdot a}}\right) \]
      5. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right)}{2 \cdot a}}\right) \]
      6. *-commutative51.1%

        \[\leadsto \log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{\color{blue}{a \cdot 2}}}\right) \]
    3. Applied egg-rr51.1%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\mathsf{fma}\left(-1, b, \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)}{a \cdot 2}}\right)} \]
    4. Taylor expanded in c around 0 3.2%

      \[\leadsto \color{blue}{0.5 \cdot \frac{b + -1 \cdot b}{a}} \]
    5. Step-by-step derivation
      1. associate-*r/3.2%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(b + -1 \cdot b\right)}{a}} \]
      2. distribute-rgt1-in3.2%

        \[\leadsto \frac{0.5 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot b\right)}}{a} \]
      3. metadata-eval3.2%

        \[\leadsto \frac{0.5 \cdot \left(\color{blue}{0} \cdot b\right)}{a} \]
      4. mul0-lft3.2%

        \[\leadsto \frac{0.5 \cdot \color{blue}{0}}{a} \]
      5. metadata-eval3.2%

        \[\leadsto \frac{\color{blue}{0}}{a} \]
    6. Simplified3.2%

      \[\leadsto \color{blue}{\frac{0}{a}} \]
    7. Final simplification3.2%

      \[\leadsto \frac{0}{a} \]

    Reproduce

    ?
    herbie shell --seed 2023166 
    (FPCore (a b c)
      :name "Quadratic roots, narrow range"
      :precision binary64
      :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
      (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))