Average Error: 7.5 → 0.4
Time: 8.7s
Precision: binary64
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\]
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}\]
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
(FPCore (x y z t)
 :precision binary64
 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
(FPCore (x y z t)
 :precision binary64
 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
	return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
double code(double x, double y, double z, double t) {
	return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (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.4
Herbie0.4
\[\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-sub_binary64_178157.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. Simplified7.5

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

    \[\leadsto \frac{x + \left(\frac{y \cdot z}{z \cdot t - x} - \color{blue}{\frac{x}{z \cdot t - x}}\right)}{x + 1}\]
  6. Using strategy rm
  7. Applied associate-/l*_binary64_177552.3

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

    \[\leadsto \frac{x + \left(\frac{y}{\color{blue}{t - \frac{x}{z}}} - \frac{x}{z \cdot t - x}\right)}{x + 1}\]
  9. Final simplification0.4

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

Reproduce

herbie shell --seed 2020342 
(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)))