Average Error: 7.1 → 0.4
Time: 26.5s
Precision: 64
Internal precision: 128
\[\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
Comparison0.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-sub 7.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 simplify 0.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: 26.5s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3318873616 970129830 3171790185 3058108782 633380758 2833484504)'
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"

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

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