Average Error: 7.1 → 0.4
Time: 51.2s
Precision: 64
Internal Precision: 384
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1.0}\]
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1.0}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original7.1
Target0.4
Herbie0.4
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1.0}\]

Derivation

  1. Initial program 7.1

    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1.0}\]
  2. Using strategy rm
  3. Applied div-sub7.1

    \[\leadsto \frac{x + \color{blue}{\left(\frac{y \cdot z}{t \cdot z - x} - \frac{x}{t \cdot z - x}\right)}}{x + 1.0}\]
  4. Applied simplify0.4

    \[\leadsto \frac{x + \left(\color{blue}{\frac{y}{t - \frac{x}{z}}} - \frac{x}{t \cdot z - x}\right)}{x + 1.0}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 51.2s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"

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

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