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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

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

Derivation

  1. Initial program 0.3

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

    \[\leadsto x + \color{blue}{\left(6.0 \cdot \left(z \cdot y\right) - 6.0 \cdot \left(z \cdot x\right)\right)}\]
  3. Applied simplify0.2

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

Runtime

Time bar (total: 46.5s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"

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

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