Average Error: 0.0 → 0.0
Time: 4.8s
Precision: binary64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(x \cdot z + \left(y \cdot \left(t - x\right) - z \cdot t\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(x \cdot z + \left(y \cdot \left(t - x\right) - z \cdot t\right)\right)
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
(FPCore (x y z t)
 :precision binary64
 (+ x (+ (* x z) (- (* y (- t x)) (* z t)))))
double code(double x, double y, double z, double t) {
	return x + ((y - z) * (t - x));
}
double code(double x, double y, double z, double t) {
	return x + ((x * z) + ((y * (t - x)) - (z * t)));
}

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

Original0.0
Target0.0
Herbie0.0
\[x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)\]

Derivation

  1. Initial program 0.0

    \[x + \left(y - z\right) \cdot \left(t - x\right)\]
  2. Using strategy rm
  3. Applied flip--_binary6418.2

    \[\leadsto x + \color{blue}{\frac{y \cdot y - z \cdot z}{y + z}} \cdot \left(t - x\right)\]
  4. Applied associate-*l/_binary6424.5

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

    \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot \left(y \cdot y - z \cdot z\right)}}{y + z}\]
  6. Taylor expanded around 0 0.0

    \[\leadsto x + \color{blue}{\left(\left(x \cdot z + t \cdot y\right) - \left(x \cdot y + t \cdot z\right)\right)}\]
  7. Simplified0.0

    \[\leadsto x + \color{blue}{\left(x \cdot z + \left(y \cdot \left(t - x\right) - z \cdot t\right)\right)}\]
  8. Final simplification0.0

    \[\leadsto x + \left(x \cdot z + \left(y \cdot \left(t - x\right) - z \cdot t\right)\right)\]

Reproduce

herbie shell --seed 2021139 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
  :precision binary64

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

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