Average Error: 1.7 → 1.7
Time: 14.9s
Precision: 64
\[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
\[\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}{a}\]

Error

Bits error versus a

Bits error versus b_2

Bits error versus c

Derivation

  1. Initial program 1.7

    \[\frac{\left(\frac{\left(-b_2\right)}{\left(\sqrt{\left(\left(b_2 \cdot b_2\right) - \left(a \cdot c\right)\right)}\right)}\right)}{a}\]
  2. Simplified1.7

    \[\leadsto \color{blue}{\frac{\left(\left(\sqrt{\left(\left(b_2 \cdot b_2\right) - \left(c \cdot a\right)\right)}\right) - b_2\right)}{a}}\]
  3. Final simplification1.7

    \[\leadsto \frac{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}{a}\]

Reproduce

herbie shell --seed 2019100 
(FPCore (a b_2 c)
  :name "quad2p (problem 3.2.1, positive)"
  (/.p16 (+.p16 (neg.p16 b_2) (sqrt.p16 (-.p16 (*.p16 b_2 b_2) (*.p16 a c)))) a))