Average Error: 0.3 → 0.2
Time: 16.2s
Precision: 64
$\left(1 \lt x \land x + 1 \lt y\right) \land \left(0 \lt z \land z \lt 2\right)$
$\frac{\frac{x}{y}}{z}$
$\frac{x}{y \cdot z}$
\frac{\frac{x}{y}}{z}
\frac{x}{y \cdot z}
double f(double x, double y, double z) {
double r23364907 = x;
double r23364908 = y;
double r23364909 = r23364907 / r23364908;
double r23364910 = z;
double r23364911 = r23364909 / r23364910;
return r23364911;
}


double f(double x, double y, double z) {
double r23364912 = x;
double r23364913 = y;
double r23364914 = z;
double r23364915 = r23364913 * r23364914;
double r23364916 = r23364912 / r23364915;
return r23364916;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.3

$\frac{\frac{x}{y}}{z}$
2. Taylor expanded around inf 0.2

$\leadsto \color{blue}{\frac{x}{z \cdot y}}$
3. Final simplification0.2

$\leadsto \frac{x}{y \cdot z}$

# Reproduce

herbie shell --seed 1
(FPCore (x y z)
:name "(x/y)/z"
:pre (and (and (< 1 x) (< (+ x 1) y)) (and (< 0 z) (< z 2)))
(/ (/ x y) z))