Average Error: 43.5 → 43.5
Time: 2.7s
Precision: binary64
\[\frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}\]
\[\frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}\]
\frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}
\frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}
double code(double y, double x, double c, double cv, double mu) {
	return ((double) (((double) (((double) (((double) (((double) (1.0 + y)) * ((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))))) * ((double) (c - cv)))) - ((double) (((double) (((double) (((double) (1.0 + y)) + ((double) (((double) (0.5 * y)) * y)))) * ((double) (1.0 + x)))) * c)))) / ((double) (((double) (((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))) * ((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))))) * mu))));
}
double code(double y, double x, double c, double cv, double mu) {
	return ((double) (((double) (((double) (((double) (((double) (1.0 + y)) * ((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))))) * ((double) (c - cv)))) - ((double) (((double) (((double) (((double) (1.0 + y)) + ((double) (((double) (0.5 * y)) * y)))) * ((double) (1.0 + x)))) * c)))) / ((double) (((double) (((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))) * ((double) (((double) (1.0 + x)) + ((double) (((double) (0.5 * x)) * x)))))) * mu))));
}

Error

Bits error versus y

Bits error versus x

Bits error versus c

Bits error versus cv

Bits error versus mu

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 43.5

    \[\frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}\]
  2. Final simplification43.5

    \[\leadsto \frac{\left(\left(1 + y\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot \left(c - cv\right) - \left(\left(\left(1 + y\right) + \left(0.5 \cdot y\right) \cdot y\right) \cdot \left(1 + x\right)\right) \cdot c}{\left(\left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right) \cdot \left(\left(1 + x\right) + \left(0.5 \cdot x\right) \cdot x\right)\right) \cdot mu}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (y x c cv mu)
  :name "(/ (- (* (* (+ 1 y) (+ (+ 1 x) (* (* 0.5 x) x))) (- c cv)) (* (* (+ (+ 1 y) (* (* 0.5 y) y)) (+ 1 x)) c)) (* (* (+ (+ 1 x) (* (* 0.5 x) x)) (+ (+ 1 x) (* (* 0.5 x) x))) mu))"
  :precision binary64
  (/ (- (* (* (+ 1.0 y) (+ (+ 1.0 x) (* (* 0.5 x) x))) (- c cv)) (* (* (+ (+ 1.0 y) (* (* 0.5 y) y)) (+ 1.0 x)) c)) (* (* (+ (+ 1.0 x) (* (* 0.5 x) x)) (+ (+ 1.0 x) (* (* 0.5 x) x))) mu)))