Average Error: 7.5 → 2.5
Time: 3.4s
Precision: binary64
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\]
\[\frac{x + y \cdot \frac{z}{z \cdot t - x}}{x + 1} - \frac{x}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\]
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\frac{x + y \cdot \frac{z}{z \cdot t - x}}{x + 1} - \frac{x}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (x + ((double) (((double) (((double) (y * z)) - x)) / ((double) (((double) (t * z)) - x)))))) / ((double) (x + 1.0))));
}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (((double) (x + ((double) (y * ((double) (z / ((double) (((double) (z * t)) - x)))))))) / ((double) (x + 1.0)))) - ((double) (x / ((double) (((double) (((double) (z * t)) - x)) * ((double) (x + 1.0))))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.5
Target0.3
Herbie2.5
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}\]

Derivation

  1. Initial program 7.5

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

    \[\leadsto \frac{x + \color{blue}{\left(\frac{y \cdot z}{t \cdot z - x} - \frac{x}{t \cdot z - x}\right)}}{x + 1}\]
  4. Applied associate-+r-7.5

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

    \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t \cdot z - x}}{x + 1} - \frac{\frac{x}{t \cdot z - x}}{x + 1}}\]
  6. Simplified2.5

    \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{z \cdot t - x}}{x + 1}} - \frac{\frac{x}{t \cdot z - x}}{x + 1}\]
  7. Simplified2.5

    \[\leadsto \frac{x + y \cdot \frac{z}{z \cdot t - x}}{x + 1} - \color{blue}{\frac{x}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}}\]
  8. Final simplification2.5

    \[\leadsto \frac{x + y \cdot \frac{z}{z \cdot t - x}}{x + 1} - \frac{x}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\]

Reproduce

herbie shell --seed 2020184 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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