Average Error: 29.3 → 29.3
Time: 1.2s
Precision: binary64
\[\left(-b\right) + \sqrt{\left(-b\right) \cdot \left(-b\right) - c}\]
\[\sqrt{\left(-b\right) \cdot \left(-b\right) - c} - b\]

Error

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 29.3

    \[\left(-b\right) + \sqrt{\left(-b\right) \cdot \left(-b\right) - c}\]
  2. Simplified29.3

    \[\leadsto \color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - c} - b}\]
  3. Final simplification29.3

    \[\leadsto \sqrt{\left(-b\right) \cdot \left(-b\right) - c} - b\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b c)
  :name "(+ (- b) (sqrt (- (* (- b) (- b)) c)))"
  :precision binary64
  (+ (neg b) (sqrt (- (* (neg b) (neg b)) c))))