Average Error: 22.7 → 22.7
Time: 1.3s
Precision: binary64
\[\left(-b\right) + \sqrt{\left({x}^{2} - 2 \cdot x\right) - 4 \cdot b}\]
\[\sqrt{\left({x}^{2} - 2 \cdot x\right) - 4 \cdot b} - b\]

Error

Bits error versus b

Bits error versus x

Derivation

  1. Initial program 22.7

    \[\left(-b\right) + \sqrt{\left({x}^{2} - 2 \cdot x\right) - 4 \cdot b}\]
  2. Simplified22.7

    \[\leadsto \color{blue}{\sqrt{\left({x}^{2} - 2 \cdot x\right) - 4 \cdot b} - b}\]
  3. Final simplification22.7

    \[\leadsto \sqrt{\left({x}^{2} - 2 \cdot x\right) - 4 \cdot b} - b\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b x)
  :name "(+ (- b) (sqrt (- (- (pow x 2.0) (* 2.0 x)) (* 4.0 b))))"
  :precision binary64
  (+ (neg b) (sqrt (- (- (pow x 2.0) (* 2.0 x)) (* 4.0 b)))))