Average Error: 1.3 → 0.6
Time: 5.3s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (z - a))))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((y <= -3.1391994516306873e-133) || !(y <= 6.291994294278049e+20))) {
		VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (z - a))))))));
	} else {
		VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a))))));
	}
	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

Original1.3
Target1.2
Herbie0.6
\[\]

Derivation

  1. Split input into 2 regimes
  2. if y < -3.13919945163068725e-133 or 629199429427804897000 < y

    1. Initial program 0.8

      \[\]

    if -3.13919945163068725e-133 < y < 629199429427804897000

    1. Initial program 2.0

      \[\]
    2. Using strategy rm
    3. Applied associate-*r/0.5

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

    \[\leadsto \]

Reproduce

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

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

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