Average Error: 0.0 → 0.0
Time: 13.2s
Precision: 64
$x - \frac{2 \cdot y + z}{3}$
$x - \frac{2 \cdot y + z}{3}$
x - \frac{2 \cdot y + z}{3}
x - \frac{2 \cdot y + z}{3}
double f(double x, double y, double z) {
double r2282964 = x;
double r2282965 = 2.0;
double r2282966 = y;
double r2282967 = r2282965 * r2282966;
double r2282968 = z;
double r2282969 = r2282967 + r2282968;
double r2282970 = 3.0;
double r2282971 = r2282969 / r2282970;
double r2282972 = r2282964 - r2282971;
return r2282972;
}


double f(double x, double y, double z) {
double r2282973 = x;
double r2282974 = 2.0;
double r2282975 = y;
double r2282976 = r2282974 * r2282975;
double r2282977 = z;
double r2282978 = r2282976 + r2282977;
double r2282979 = 3.0;
double r2282980 = r2282978 / r2282979;
double r2282981 = r2282973 - r2282980;
return r2282981;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$x - \frac{2 \cdot y + z}{3}$
2. Final simplification0.0

$\leadsto x - \frac{2 \cdot y + z}{3}$

# Reproduce

herbie shell --seed 1
(FPCore (x y z)
:name "x - (2 * y + z) / 3"
:precision binary64
(- x (/ (+ (* 2 y) z) 3)))