Average Error: 0.2 → 0.2
Time: 13.2s
Precision: 64
Internal precision: 128
\[x + \left(\left(y - x\right) \cdot 6.0\right) \cdot z\]
\[\left(\left(y - x\right) \cdot z\right) \cdot 6.0 + x\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.2
Comparison0.2
Herbie0.2
\[ x - \left(6.0 \cdot z\right) \cdot \left(x - y\right) \]

Derivation

  1. Initial program 0.2

    \[x + \left(\left(y - x\right) \cdot 6.0\right) \cdot z\]
  2. Applied taylor 0.2

    \[\leadsto x + \left(6.0 \cdot \left(y \cdot z\right) - 6.0 \cdot \left(x \cdot z\right)\right)\]
  3. Taylor expanded around inf 0.2

    \[\leadsto x + \color{blue}{\left(6.0 \cdot \left(y \cdot z\right) - 6.0 \cdot \left(x \cdot z\right)\right)}\]
  4. Applied simplify 0.2

    \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(z \cdot 6.0\right) + x}\]
  5. Using strategy rm
  6. Applied associate-*r* 0.2

    \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot z\right) \cdot 6.0} + x\]
  7. Removed slow pow expressions

Runtime

Time bar (total: 13.2s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3850774983 865926201 3218447212 333347838 259781246 1993740217)'
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"

  :target
  (- x (* (* 6.0 z) (- x y)))

  (+ x (* (* (- y x) 6.0) z)))