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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original5.6
Comparison5.5
Herbie5.5
\[ {x}^2 - 4.0 \cdot \left(y \cdot \left({z}^2 - t\right)\right) \]

Derivation

  1. Initial program 5.6

    \[x \cdot x - \left(y \cdot 4.0\right) \cdot \left(z \cdot z - t\right)\]
  2. Applied simplify 5.6

    \[\leadsto \color{blue}{{x}^2 - \left({z}^2 - t\right) \cdot \left(y \cdot 4.0\right)}\]
  3. Using strategy rm
  4. Applied associate-*r* 5.5

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

Runtime

Time bar (total: 23.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1415815954 2014761185 1390269127 3685176884 1187265416 4226854817)'
(FPCore (x y z t)
  :name "Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B"

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

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