Average Error: 1.8 → 1.8
Time: 25.6s
Precision: 64
Internal precision: 128
\[x + \left(y - x\right) \cdot \frac{z}{t}\]
\[x + \left(y - x\right) \cdot \frac{z}{t}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original1.8
Comparison2.1
Herbie1.8
\[ \begin{array}{l} \mathbf{if}\;\left(y - x\right) \cdot \frac{z}{t} \lt -1013646692435.8867:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \mathbf{if}\;\left(y - x\right) \cdot \frac{z}{t} \lt -0.0:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array} \]

Derivation

  1. Initial program 1.8

    \[x + \left(y - x\right) \cdot \frac{z}{t}\]
  2. Removed slow pow expressions

Runtime

Time bar (total: 25.6s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(937187268 120357883 3160606162 4067418046 3411405639 3271769127)'
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"

  :target
  (if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))

  (+ x (* (- y x) (/ z t))))