Average Error: 10.3 → 1.5
Time: 1.0m
Precision: 64
Internal Precision: 384
\[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
\[x + \frac{y}{1} \cdot \frac{z - t}{z - a}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original10.3
Target1.4
Herbie1.5
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Initial program 10.3

    \[x + \frac{y \cdot \left(z - t\right)}{z - a}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity10.3

    \[\leadsto x + \frac{y \cdot \left(z - t\right)}{\color{blue}{1 \cdot \left(z - a\right)}}\]
  4. Applied times-frac1.5

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

Runtime

Time bar (total: 1.0m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

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