Average Error: 7.2 → 2.1
Time: 20.5s
Precision: binary64
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\]
\[\frac{x + \left(\frac{z}{z \cdot t - x} \cdot y - \frac{x}{z \cdot t - x}\right)}{x + 1}\]
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\frac{x + \left(\frac{z}{z \cdot t - x} \cdot y - \frac{x}{z \cdot t - 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 (- (* (/ z (- (* z t) x)) y) (/ x (- (* z t) 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 + (((z / ((z * t) - x)) * y) - (x / ((z * t) - 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.2
Target0.3
Herbie2.1
\[\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}\]

Derivation

  1. Initial program 7.2

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

    \[\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.2

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

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

    \[\leadsto \frac{x + \left(\frac{z}{\color{blue}{\frac{z \cdot t - x}{y}}} - \frac{x}{t \cdot z - x}\right)}{x + 1}\]
  8. Using strategy rm
  9. Applied associate-/r/_binary64_157102.1

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

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

Reproduce

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