Average Error: 19.9 → 19.9
Time: 1.9s
Precision: binary64
\[\frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}\]
\[\frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}\]
\frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}
\frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}
double code(double x, double z) {
	return ((double) (((double) (((double) (((double) (2.0 * x)) + ((double) log(x)))) - ((double) (((double) (z * ((double) (x + 1.0)))) * x)))) / ((double) (((double) (((double) (((double) (((double) (((double) (((double) (2.0 * x)) + 4.0)) * x)) + 2.0)) + x)) + ((double) log(x)))) - z))));
}
double code(double x, double z) {
	return ((double) (((double) (((double) (((double) (2.0 * x)) + ((double) log(x)))) - ((double) (((double) (z * ((double) (x + 1.0)))) * x)))) / ((double) (((double) (((double) (((double) (((double) (((double) (((double) (2.0 * x)) + 4.0)) * x)) + 2.0)) + x)) + ((double) log(x)))) - z))));
}

Error

Bits error versus x

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 19.9

    \[\frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}\]
  2. Final simplification19.9

    \[\leadsto \frac{\left(2 \cdot x + \log x\right) - \left(z \cdot \left(x + 1\right)\right) \cdot x}{\left(\left(\left(\left(2 \cdot x + 4\right) \cdot x + 2\right) + x\right) + \log x\right) - z}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x z)
  :name "(/ (- (+ (* 2 x) (log x)) (* (* z (+ x 1)) x)) (- (+ (+ (+ (* (+ (* 2 x) 4) x) 2) x) (log x)) z))"
  :precision binary64
  (/ (- (+ (* 2.0 x) (log x)) (* (* z (+ x 1.0)) x)) (- (+ (+ (+ (* (+ (* 2.0 x) 4.0) x) 2.0) x) (log x)) z)))