Average Error: 11.7 → 1.1
Time: 5.1s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t) {
	return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= -7.197295960718093e+303)) {
		VAR = ((double) (x * ((double) (((double) (y - z)) / ((double) (t - z))))));
	} else {
		double VAR_1;
		if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 8.52786738304643e+274)) {
			VAR_1 = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
		} else {
			VAR_1 = ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.7
Target2.3
Herbie1.1
\[\]

Derivation

  1. Split input into 3 regimes
  2. if (/ (* x (- y z)) (- t z)) < -7.19729596071809293e303

    1. Initial program 63.3

      \[\]
    2. Simplified0.2

      \[\leadsto \]

    if -7.19729596071809293e303 < (/ (* x (- y z)) (- t z)) < 8.5278673830464306e274

    1. Initial program 1.1

      \[\]

    if 8.5278673830464306e274 < (/ (* x (- y z)) (- t z))

    1. Initial program 58.9

      \[\]
    2. Simplified1.1

      \[\leadsto \]
    3. Using strategy rm
    4. Applied clear-num1.1

      \[\leadsto \]
    5. Using strategy rm
    6. Applied un-div-inv1.0

      \[\leadsto \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.1

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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