Average Error: 1.0 → 0.0
Time: 1.8s
Precision: binary64
\[\frac{e^{x + y}}{e^{z + y}}\]
\[e^{x - z}\]
\frac{e^{x + y}}{e^{z + y}}
e^{x - z}
double code(double x, double y, double z) {
	return ((double) (((double) exp(((double) (x + y)))) / ((double) exp(((double) (z + y))))));
}
double code(double x, double y, double z) {
	return ((double) exp(((double) (x - z))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 1.0

    \[\frac{e^{x + y}}{e^{z + y}}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{e^{x - z}}\]
  3. Final simplification0.0

    \[\leadsto e^{x - z}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y z)
  :name "(/ (exp (+ x y)) (exp (+ z y)))"
  :precision binary64
  (/ (exp (+ x y)) (exp (+ z y))))