Average Error: 10.5 → 0.4
Time: 4.6s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= -inf.0) || !(((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= 1.695021952440814e+246))) {
		VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (a - t))))))));
	} else {
		VAR = ((double) (((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) + x));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.5
Target1.3
Herbie0.4
\[\]

Derivation

  1. Split input into 2 regimes
  2. if (/ (* y (- z t)) (- a t)) < -inf.0 or 1.695021952440814e246 < (/ (* y (- z t)) (- a t))

    1. Initial program 59.4

      \[\]
    2. Simplified0.9

      \[\leadsto \]

    if -inf.0 < (/ (* y (- z t)) (- a t)) < 1.695021952440814e246

    1. Initial program 0.2

      \[\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \]

Reproduce

herbie shell --seed 2020190 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

  (+ x (/ (* y (- z t)) (- a t))))