Average Error: 0.1 → 0.0
Time: 11.3s
Precision: 64
Internal precision: 128
\[x \cdot x - \left(y \cdot 4.0\right) \cdot z\]
\[{x}^2 - 4.0 \cdot \left(y \cdot z\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.1
Comparison0.1
Herbie0.0
\[ {x}^2 - z \cdot \left(y \cdot 4.0\right) \]

Derivation

  1. Initial program 0.1

    \[x \cdot x - \left(y \cdot 4.0\right) \cdot z\]
  2. Applied taylor 0.0

    \[\leadsto {x}^2 - 4.0 \cdot \left(y \cdot z\right)\]
  3. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{{x}^2 - 4.0 \cdot \left(y \cdot z\right)}\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 11.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(435663511 3179944975 447074150 1807259721 1318075163 2714129700)'
(FPCore (x y z)
  :name "Graphics.Rasterific.QuadraticFormula:discriminant from Rasterific-0.6.1"

  :target
  (- (sqr x) (* z (* y 4.0)))

  (- (* x x) (* (* y 4.0) z)))