Average Error: 6.8 → 2.1
Time: 3.5s
Precision: 64
\[x + \frac{y \cdot \left(z - x\right)}{t}\]
\[x + \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t}}{z - x}}\]
x + \frac{y \cdot \left(z - x\right)}{t}
x + \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t}}{z - x}}
double code(double x, double y, double z, double t) {
	return (x + ((y * (z - x)) / t));
}
double code(double x, double y, double z, double t) {
	return (x + ((cbrt(y) / ((cbrt(t) * cbrt(t)) / cbrt(y))) * (cbrt(y) / (cbrt(t) / (z - x)))));
}

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

Original6.8
Target2.3
Herbie2.1
\[x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)\]

Derivation

  1. Initial program 6.8

    \[x + \frac{y \cdot \left(z - x\right)}{t}\]
  2. Using strategy rm
  3. Applied associate-/l*6.1

    \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z - x}}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity6.1

    \[\leadsto x + \frac{y}{\frac{t}{\color{blue}{1 \cdot \left(z - x\right)}}}\]
  6. Applied add-cube-cbrt6.6

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

    \[\leadsto x + \frac{y}{\color{blue}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{1} \cdot \frac{\sqrt[3]{t}}{z - x}}}\]
  8. Applied add-cube-cbrt6.7

    \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{1} \cdot \frac{\sqrt[3]{t}}{z - x}}\]
  9. Applied times-frac2.1

    \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{1}} \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t}}{z - x}}}\]
  10. Simplified2.1

    \[\leadsto x + \color{blue}{\frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{y}}}} \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t}}{z - x}}\]
  11. Final simplification2.1

    \[\leadsto x + \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt[3]{t}}{z - x}}\]

Reproduce

herbie shell --seed 2020091 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

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

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