quadm (p42, negative)

Percentage Accurate: 54.6% → 86.5%
Time: 12.5s
Alternatives: 8
Speedup: 2.8×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary32
 (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))
float code(float a, float b, float c) {
	return (-b - sqrtf(((b * b) - (4.0f * (a * c))))) / (2.0f * a);
}
real(4) function code(a, b, c)
    real(4), intent (in) :: a
    real(4), intent (in) :: b
    real(4), intent (in) :: c
    code = (-b - sqrt(((b * b) - (4.0e0 * (a * c))))) / (2.0e0 * a)
end function
function code(a, b, c)
	return Float32(Float32(Float32(-b) - sqrt(Float32(Float32(b * b) - Float32(Float32(4.0) * Float32(a * c))))) / Float32(Float32(2.0) * a))
end
function tmp = code(a, b, c)
	tmp = (-b - sqrt(((b * b) - (single(4.0) * (a * c))))) / (single(2.0) * a);
end
\begin{array}{l}

\\
\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\end{array}

Sampling outcomes in binary32 precision:

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 8 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.

Initial Program: 54.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary32
 (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))
float code(float a, float b, float c) {
	return (-b - sqrtf(((b * b) - (4.0f * (a * c))))) / (2.0f * a);
}
real(4) function code(a, b, c)
    real(4), intent (in) :: a
    real(4), intent (in) :: b
    real(4), intent (in) :: c
    code = (-b - sqrt(((b * b) - (4.0e0 * (a * c))))) / (2.0e0 * a)
end function
function code(a, b, c)
	return Float32(Float32(Float32(-b) - sqrt(Float32(Float32(b * b) - Float32(Float32(4.0) * Float32(a * c))))) / Float32(Float32(2.0) * a))
end
function tmp = code(a, b, c)
	tmp = (-b - sqrt(((b * b) - (single(4.0) * (a * c))))) / (single(2.0) * a);
end
\begin{array}{l}

\\
\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\end{array}

Alternative 1: 86.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{elif}\;b \leq 100000000376832:\\ \;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(\left(-4 \cdot c\right), a, b, b\right)} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary32
 (if (<= b -9.999999974752427e-7)
   (/ c (- b))
   (if (<= b 100000000376832.0)
     (/ (+ (sqrt (dotprod (* -4.0 c) a b b)) b) (* -2.0 a))
     (- (/ c b) (/ b a)))))
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\
\;\;\;\;\frac{c}{-b}\\

\mathbf{elif}\;b \leq 100000000376832:\\
\;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(\left(-4 \cdot c\right), a, b, b\right)} + b}{-2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.99999997e-7

    1. Initial program 13.1%

      \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c}{b}\right)} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \color{blue}{\frac{c}{\mathsf{neg}\left(b\right)}} \]
      3. mul-1-negN/A

        \[\leadsto \frac{c}{\color{blue}{-1 \cdot b}} \]
      4. lower-/.f32N/A

        \[\leadsto \color{blue}{\frac{c}{-1 \cdot b}} \]
      5. mul-1-negN/A

        \[\leadsto \frac{c}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
      6. lower-neg.f3289.3

        \[\leadsto \frac{c}{\color{blue}{-b}} \]
    5. Applied rewrites89.3%

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

    if -9.99999997e-7 < b < 1e14

    1. Initial program 77.6%

      \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
    2. Add Preprocessing
    3. Applied rewrites77.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{dotprod}\left(-4, \left(c \cdot a\right), b, b\right)}}{-2 \cdot a} + \frac{b}{-2 \cdot a}} \]
    4. Applied rewrites77.6%

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{dotprod}\left(\left(a \cdot c\right), -4, b, b\right)} + b}{-2 \cdot a}} \]
    5. Step-by-step derivation
      1. lift-dotprod.f32N/A

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

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(a \cdot c\right) \cdot -4}} + b}{-2 \cdot a} \]
      3. lift-*.f32N/A

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

        \[\leadsto \frac{\sqrt{b \cdot b + \color{blue}{a \cdot \left(c \cdot -4\right)}} + b}{-2 \cdot a} \]
      5. lift-*.f32N/A

        \[\leadsto \frac{\sqrt{b \cdot b + a \cdot \color{blue}{\left(c \cdot -4\right)}} + b}{-2 \cdot a} \]
      6. *-commutativeN/A

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

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

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{dotprod}\left(\left(c \cdot -4\right), a, b, b\right)}} + b}{-2 \cdot a} \]
      9. lift-*.f32N/A

        \[\leadsto \frac{\sqrt{\mathsf{dotprod}\left(\color{blue}{\left(c \cdot -4\right)}, a, b, b\right)} + b}{-2 \cdot a} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\sqrt{\mathsf{dotprod}\left(\color{blue}{\left(-4 \cdot c\right)}, a, b, b\right)} + b}{-2 \cdot a} \]
      11. lower-*.f3277.7

        \[\leadsto \frac{\sqrt{\mathsf{dotprod}\left(\color{blue}{\left(-4 \cdot c\right)}, a, b, b\right)} + b}{-2 \cdot a} \]
    6. Applied rewrites77.7%

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

    if 1e14 < b

    1. Initial program 52.6%

      \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in c around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
      2. lower-fma.f32N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
      3. lower-/.f32N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
      4. lower-/.f3299.6

        \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
    5. Applied rewrites99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
    6. Step-by-step derivation
      1. Applied rewrites99.6%

        \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification86.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{elif}\;b \leq 100000000376832:\\ \;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(\left(-4 \cdot c\right), a, b, b\right)} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 86.5% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{elif}\;b \leq 100000000376832:\\ \;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(-4, \left(c \cdot a\right), b, b\right)} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary32
     (if (<= b -9.999999974752427e-7)
       (/ c (- b))
       (if (<= b 100000000376832.0)
         (/ (+ (sqrt (dotprod -4.0 (* c a) b b)) b) (* -2.0 a))
         (- (/ c b) (/ b a)))))
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\
    \;\;\;\;\frac{c}{-b}\\
    
    \mathbf{elif}\;b \leq 100000000376832:\\
    \;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(-4, \left(c \cdot a\right), b, b\right)} + b}{-2 \cdot a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -9.99999997e-7

      1. Initial program 13.1%

        \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
      2. Add Preprocessing
      3. Taylor expanded in b around -inf

        \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c}{b}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{c}{\mathsf{neg}\left(b\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{c}{\color{blue}{-1 \cdot b}} \]
        4. lower-/.f32N/A

          \[\leadsto \color{blue}{\frac{c}{-1 \cdot b}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{c}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
        6. lower-neg.f3289.3

          \[\leadsto \frac{c}{\color{blue}{-b}} \]
      5. Applied rewrites89.3%

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

      if -9.99999997e-7 < b < 1e14

      1. Initial program 77.6%

        \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
      2. Add Preprocessing
      3. Applied rewrites77.6%

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

      if 1e14 < b

      1. Initial program 52.6%

        \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
      2. Add Preprocessing
      3. Taylor expanded in c around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
        2. lower-fma.f32N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
        3. lower-/.f32N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
        4. lower-/.f3299.6

          \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
      5. Applied rewrites99.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites99.6%

          \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification86.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.999999974752427 \cdot 10^{-7}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{elif}\;b \leq 100000000376832:\\ \;\;\;\;\frac{\sqrt{\mathsf{dotprod}\left(-4, \left(c \cdot a\right), b, b\right)} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 81.5% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\ \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\ \;\;\;\;\frac{b + \sqrt{\left(-4 \cdot c\right) \cdot a}}{2 \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary32
       (if (<= b -1.999999987845058e-8)
         (/ (fma a (square (/ c b)) c) (- b))
         (if (<= b 1.9499999837080395e-7)
           (/ (+ b (sqrt (* (* -4.0 c) a))) (* 2.0 (- a)))
           (- (/ c b) (/ b a)))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\
      
      \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\
      \;\;\;\;\frac{b + \sqrt{\left(-4 \cdot c\right) \cdot a}}{2 \cdot \left(-a\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if b < -1.99999999e-8

        1. Initial program 17.5%

          \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
        2. Add Preprocessing
        3. Applied rewrites17.5%

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

          \[\leadsto \color{blue}{-1 \cdot \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
        5. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}\right)} \]
          2. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{\mathsf{neg}\left(b\right)}} \]
          3. mul-1-negN/A

            \[\leadsto \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{\color{blue}{-1 \cdot b}} \]
          4. lower-/.f32N/A

            \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{-1 \cdot b}} \]
          5. +-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{a \cdot {c}^{2}}{{b}^{2}} + c}}{-1 \cdot b} \]
          6. associate-/l*N/A

            \[\leadsto \frac{\color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}} + c}{-1 \cdot b} \]
          7. lower-fma.f32N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, \frac{{c}^{2}}{{b}^{2}}, c\right)}}{-1 \cdot b} \]
          8. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \frac{\color{blue}{c \cdot c}}{{b}^{2}}, c\right)}{-1 \cdot b} \]
          9. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \frac{c \cdot c}{\color{blue}{b \cdot b}}, c\right)}{-1 \cdot b} \]
          10. times-fracN/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \color{blue}{\frac{c}{b} \cdot \frac{c}{b}}, c\right)}{-1 \cdot b} \]
          11. lower-square.f32N/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \color{blue}{\mathsf{square}\left(\left(\frac{c}{b}\right)\right)}, c\right)}{-1 \cdot b} \]
          12. lower-/.f32N/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\color{blue}{\left(\frac{c}{b}\right)}\right), c\right)}{-1 \cdot b} \]
          13. mul-1-negN/A

            \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
          14. lower-neg.f3287.4

            \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{\color{blue}{-b}} \]
        6. Applied rewrites87.4%

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

        if -1.99999999e-8 < b < 1.94999998e-7

        1. Initial program 73.5%

          \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
        2. Add Preprocessing
        3. Applied rewrites73.5%

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

          \[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}}{2 \cdot a} \]
        5. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{\left(-4 \cdot c\right) \cdot a}}}{2 \cdot a} \]
          3. lower-*.f32N/A

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

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

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

        if 1.94999998e-7 < b

        1. Initial program 64.7%

          \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
        2. Add Preprocessing
        3. Taylor expanded in c around 0

          \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
          2. lower-fma.f32N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
          3. lower-/.f32N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
          4. lower-/.f3292.9

            \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
        5. Applied rewrites92.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
        6. Step-by-step derivation
          1. Applied rewrites92.9%

            \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
        7. Recombined 3 regimes into one program.
        8. Final simplification83.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\ \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\ \;\;\;\;\frac{b + \sqrt{\left(-4 \cdot c\right) \cdot a}}{2 \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 4: 81.5% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\ \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\left(c \cdot a\right) \cdot -4} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary32
         (if (<= b -1.999999987845058e-8)
           (/ (fma a (square (/ c b)) c) (- b))
           (if (<= b 1.9499999837080395e-7)
             (/ (+ (sqrt (* (* c a) -4.0)) b) (* -2.0 a))
             (- (/ c b) (/ b a)))))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\
        
        \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\
        \;\;\;\;\frac{\sqrt{\left(c \cdot a\right) \cdot -4} + b}{-2 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -1.99999999e-8

          1. Initial program 17.5%

            \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
          2. Add Preprocessing
          3. Applied rewrites17.5%

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

            \[\leadsto \color{blue}{-1 \cdot \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
          5. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}\right)} \]
            2. distribute-neg-frac2N/A

              \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{\mathsf{neg}\left(b\right)}} \]
            3. mul-1-negN/A

              \[\leadsto \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{\color{blue}{-1 \cdot b}} \]
            4. lower-/.f32N/A

              \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{-1 \cdot b}} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\frac{a \cdot {c}^{2}}{{b}^{2}} + c}}{-1 \cdot b} \]
            6. associate-/l*N/A

              \[\leadsto \frac{\color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}} + c}{-1 \cdot b} \]
            7. lower-fma.f32N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, \frac{{c}^{2}}{{b}^{2}}, c\right)}}{-1 \cdot b} \]
            8. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \frac{\color{blue}{c \cdot c}}{{b}^{2}}, c\right)}{-1 \cdot b} \]
            9. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \frac{c \cdot c}{\color{blue}{b \cdot b}}, c\right)}{-1 \cdot b} \]
            10. times-fracN/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \color{blue}{\frac{c}{b} \cdot \frac{c}{b}}, c\right)}{-1 \cdot b} \]
            11. lower-square.f32N/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \color{blue}{\mathsf{square}\left(\left(\frac{c}{b}\right)\right)}, c\right)}{-1 \cdot b} \]
            12. lower-/.f32N/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\color{blue}{\left(\frac{c}{b}\right)}\right), c\right)}{-1 \cdot b} \]
            13. mul-1-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
            14. lower-neg.f3287.4

              \[\leadsto \frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{\color{blue}{-b}} \]
          6. Applied rewrites87.4%

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

          if -1.99999999e-8 < b < 1.94999998e-7

          1. Initial program 73.5%

            \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
          2. Add Preprocessing
          3. Applied rewrites73.4%

            \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{dotprod}\left(-4, \left(c \cdot a\right), b, b\right)}}{-2 \cdot a} + \frac{b}{-2 \cdot a}} \]
          4. Applied rewrites73.5%

            \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{dotprod}\left(\left(a \cdot c\right), -4, b, b\right)} + b}{-2 \cdot a}} \]
          5. Taylor expanded in a around inf

            \[\leadsto \frac{\sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}} + b}{-2 \cdot a} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}} + b}{-2 \cdot a} \]
            2. lower-*.f32N/A

              \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}} + b}{-2 \cdot a} \]
            3. *-commutativeN/A

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

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

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

          if 1.94999998e-7 < b

          1. Initial program 64.7%

            \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
          2. Add Preprocessing
          3. Taylor expanded in c around 0

            \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
            2. lower-fma.f32N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
            3. lower-/.f32N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
            4. lower-/.f3292.9

              \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
          5. Applied rewrites92.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
          6. Step-by-step derivation
            1. Applied rewrites92.9%

              \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
          7. Recombined 3 regimes into one program.
          8. Final simplification83.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.999999987845058 \cdot 10^{-8}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, \mathsf{square}\left(\left(\frac{c}{b}\right)\right), c\right)}{-b}\\ \mathbf{elif}\;b \leq 1.9499999837080395 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\left(c \cdot a\right) \cdot -4} + b}{-2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 5: 68.8% accurate, 1.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.999999955487895 \cdot 10^{-38}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary32
           (if (<= b -4.999999955487895e-38) (/ c (- b)) (- (/ c b) (/ b a))))
          float code(float a, float b, float c) {
          	float tmp;
          	if (b <= -4.999999955487895e-38f) {
          		tmp = c / -b;
          	} else {
          		tmp = (c / b) - (b / a);
          	}
          	return tmp;
          }
          
          real(4) function code(a, b, c)
              real(4), intent (in) :: a
              real(4), intent (in) :: b
              real(4), intent (in) :: c
              real(4) :: tmp
              if (b <= (-4.999999955487895e-38)) then
                  tmp = c / -b
              else
                  tmp = (c / b) - (b / a)
              end if
              code = tmp
          end function
          
          function code(a, b, c)
          	tmp = Float32(0.0)
          	if (b <= Float32(-4.999999955487895e-38))
          		tmp = Float32(c / Float32(-b));
          	else
          		tmp = Float32(Float32(c / b) - Float32(b / a));
          	end
          	return tmp
          end
          
          function tmp_2 = code(a, b, c)
          	tmp = single(0.0);
          	if (b <= single(-4.999999955487895e-38))
          		tmp = c / -b;
          	else
          		tmp = (c / b) - (b / a);
          	end
          	tmp_2 = tmp;
          end
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b \leq -4.999999955487895 \cdot 10^{-38}:\\
          \;\;\;\;\frac{c}{-b}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < -4.99999996e-38

            1. Initial program 34.2%

              \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
            2. Add Preprocessing
            3. Taylor expanded in b around -inf

              \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c}{b}\right)} \]
              2. distribute-neg-frac2N/A

                \[\leadsto \color{blue}{\frac{c}{\mathsf{neg}\left(b\right)}} \]
              3. mul-1-negN/A

                \[\leadsto \frac{c}{\color{blue}{-1 \cdot b}} \]
              4. lower-/.f32N/A

                \[\leadsto \color{blue}{\frac{c}{-1 \cdot b}} \]
              5. mul-1-negN/A

                \[\leadsto \frac{c}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
              6. lower-neg.f3267.1

                \[\leadsto \frac{c}{\color{blue}{-b}} \]
            5. Applied rewrites67.1%

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

            if -4.99999996e-38 < b

            1. Initial program 67.4%

              \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
            2. Add Preprocessing
            3. Taylor expanded in c around 0

              \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
              2. lower-fma.f32N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
              3. lower-/.f32N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
              4. lower-/.f3276.1

                \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
            5. Applied rewrites76.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites76.1%

                \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
            7. Recombined 2 regimes into one program.
            8. Final simplification71.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.999999955487895 \cdot 10^{-38}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
            9. Add Preprocessing

            Alternative 6: 68.3% accurate, 2.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.999999955487895 \cdot 10^{-38}:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \end{array} \]
            (FPCore (a b c)
             :precision binary32
             (if (<= b -4.999999955487895e-38) (/ c (- b)) (/ (- b) a)))
            float code(float a, float b, float c) {
            	float tmp;
            	if (b <= -4.999999955487895e-38f) {
            		tmp = c / -b;
            	} else {
            		tmp = -b / a;
            	}
            	return tmp;
            }
            
            real(4) function code(a, b, c)
                real(4), intent (in) :: a
                real(4), intent (in) :: b
                real(4), intent (in) :: c
                real(4) :: tmp
                if (b <= (-4.999999955487895e-38)) then
                    tmp = c / -b
                else
                    tmp = -b / a
                end if
                code = tmp
            end function
            
            function code(a, b, c)
            	tmp = Float32(0.0)
            	if (b <= Float32(-4.999999955487895e-38))
            		tmp = Float32(c / Float32(-b));
            	else
            		tmp = Float32(Float32(-b) / a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, c)
            	tmp = single(0.0);
            	if (b <= single(-4.999999955487895e-38))
            		tmp = c / -b;
            	else
            		tmp = -b / a;
            	end
            	tmp_2 = tmp;
            end
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b \leq -4.999999955487895 \cdot 10^{-38}:\\
            \;\;\;\;\frac{c}{-b}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{-b}{a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < -4.99999996e-38

              1. Initial program 34.2%

                \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
              2. Add Preprocessing
              3. Taylor expanded in b around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c}{b}\right)} \]
                2. distribute-neg-frac2N/A

                  \[\leadsto \color{blue}{\frac{c}{\mathsf{neg}\left(b\right)}} \]
                3. mul-1-negN/A

                  \[\leadsto \frac{c}{\color{blue}{-1 \cdot b}} \]
                4. lower-/.f32N/A

                  \[\leadsto \color{blue}{\frac{c}{-1 \cdot b}} \]
                5. mul-1-negN/A

                  \[\leadsto \frac{c}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
                6. lower-neg.f3267.1

                  \[\leadsto \frac{c}{\color{blue}{-b}} \]
              5. Applied rewrites67.1%

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

              if -4.99999996e-38 < b

              1. Initial program 67.4%

                \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
              2. Add Preprocessing
              3. Taylor expanded in a around 0

                \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
              4. Step-by-step derivation
                1. associate-*r/N/A

                  \[\leadsto \color{blue}{\frac{-1 \cdot b}{a}} \]
                2. lower-/.f32N/A

                  \[\leadsto \color{blue}{\frac{-1 \cdot b}{a}} \]
                3. mul-1-negN/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{a} \]
                4. lower-neg.f3275.2

                  \[\leadsto \frac{\color{blue}{-b}}{a} \]
              5. Applied rewrites75.2%

                \[\leadsto \color{blue}{\frac{-b}{a}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 7: 36.1% accurate, 4.0× speedup?

            \[\begin{array}{l} \\ \frac{c}{-b} \end{array} \]
            (FPCore (a b c) :precision binary32 (/ c (- b)))
            float code(float a, float b, float c) {
            	return c / -b;
            }
            
            real(4) function code(a, b, c)
                real(4), intent (in) :: a
                real(4), intent (in) :: b
                real(4), intent (in) :: c
                code = c / -b
            end function
            
            function code(a, b, c)
            	return Float32(c / Float32(-b))
            end
            
            function tmp = code(a, b, c)
            	tmp = c / -b;
            end
            
            \begin{array}{l}
            
            \\
            \frac{c}{-b}
            \end{array}
            
            Derivation
            1. Initial program 48.6%

              \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
            2. Add Preprocessing
            3. Taylor expanded in b around -inf

              \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{c}{b}\right)} \]
              2. distribute-neg-frac2N/A

                \[\leadsto \color{blue}{\frac{c}{\mathsf{neg}\left(b\right)}} \]
              3. mul-1-negN/A

                \[\leadsto \frac{c}{\color{blue}{-1 \cdot b}} \]
              4. lower-/.f32N/A

                \[\leadsto \color{blue}{\frac{c}{-1 \cdot b}} \]
              5. mul-1-negN/A

                \[\leadsto \frac{c}{\color{blue}{\mathsf{neg}\left(b\right)}} \]
              6. lower-neg.f3240.1

                \[\leadsto \frac{c}{\color{blue}{-b}} \]
            5. Applied rewrites40.1%

              \[\leadsto \color{blue}{\frac{c}{-b}} \]
            6. Add Preprocessing

            Alternative 8: 13.0% accurate, 4.4× speedup?

            \[\begin{array}{l} \\ \frac{c}{b} \end{array} \]
            (FPCore (a b c) :precision binary32 (/ c b))
            float code(float a, float b, float c) {
            	return c / b;
            }
            
            real(4) function code(a, b, c)
                real(4), intent (in) :: a
                real(4), intent (in) :: b
                real(4), intent (in) :: c
                code = c / b
            end function
            
            function code(a, b, c)
            	return Float32(c / b)
            end
            
            function tmp = code(a, b, c)
            	tmp = c / b;
            end
            
            \begin{array}{l}
            
            \\
            \frac{c}{b}
            \end{array}
            
            Derivation
            1. Initial program 48.6%

              \[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \]
            2. Add Preprocessing
            3. Taylor expanded in c around 0

              \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\frac{b}{a} \cdot -1} + \frac{c}{b} \]
              2. lower-fma.f32N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{a}, -1, \frac{c}{b}\right)} \]
              3. lower-/.f32N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{a}}, -1, \frac{c}{b}\right) \]
              4. lower-/.f3235.6

                \[\leadsto \mathsf{fma}\left(\frac{b}{a}, -1, \color{blue}{\frac{c}{b}}\right) \]
            5. Applied rewrites35.6%

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

              \[\leadsto \frac{c}{\color{blue}{b}} \]
            7. Step-by-step derivation
              1. Applied rewrites12.9%

                \[\leadsto \frac{c}{\color{blue}{b}} \]
              2. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024341 
              (FPCore (a b c)
                :name "quadm (p42, negative)"
                :precision binary32
                :herbie-expected 10
              
                :alt
                (! :herbie-platform default (let ((sqtD (let ((x (* (sqrt (fabs a)) (sqrt (fabs c))))) (if (== (copysign a c) a) (* (sqrt (- (fabs (/ b 2)) x)) (sqrt (+ (fabs (/ b 2)) x))) (hypot (/ b 2) x))))) (if (< b 0) (/ c (- sqtD (/ b 2))) (/ (+ (/ b 2) sqtD) (- a)))))
              
                (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))