Average Error: 0.4 → 0.2
Time: 27.4s
Precision: 64
Internal precision: 128
\[\frac{60.0 \cdot \left(x - y\right)}{z - t} + a \cdot 120.0\]
\[\frac{x - y}{z - t} \cdot 60.0 + a \cdot 120.0\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original0.4
Comparison0.2
Herbie0.2
\[ \frac{60.0}{\frac{z - t}{x - y}} + a \cdot 120.0 \]

Derivation

  1. Initial program 0.4

    \[\frac{60.0 \cdot \left(x - y\right)}{z - t} + a \cdot 120.0\]
  2. Applied taylor 0.4

    \[\leadsto \frac{60.0 \cdot x - 60.0 \cdot y}{z - t} + a \cdot 120.0\]
  3. Taylor expanded around 0 0.4

    \[\leadsto \frac{\color{blue}{60.0 \cdot x - 60.0 \cdot y}}{z - t} + a \cdot 120.0\]
  4. Applied simplify 0.2

    \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60.0 + a \cdot 120.0}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 27.4s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1008351255 450308421 3603482358 3193865752 2516404102 1994500344)'
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"

  :target
  (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))

  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))