Average Error: 24.2 → 10.0
Time: 8.7s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t, double a) {
	return ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z))))));
}
double code(double x, double y, double z, double t, double a) {
	double VAR;
	if (((z <= -1.380682506546204e+178) || !(z <= 2.0634608585796736e+222))) {
		VAR = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
	} else {
		VAR = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))) * ((double) cbrt(((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) cbrt(((double) (a - z))))))))))));
	}
	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

Original24.2
Target11.6
Herbie10.0
\[\]

Derivation

  1. Split input into 2 regimes
  2. if z < -1.38068250654620404e178 or 2.06346085857967359e222 < z

    1. Initial program 48.8

      \[\]
    2. Simplified30.6

      \[\leadsto \]
    3. Taylor expanded around inf 24.1

      \[\leadsto \]
    4. Simplified13.8

      \[\leadsto \]

    if -1.38068250654620404e178 < z < 2.06346085857967359e222

    1. Initial program 17.7

      \[\]
    2. Simplified10.6

      \[\leadsto \]
    3. Using strategy rm
    4. Applied add-cube-cbrt11.2

      \[\leadsto \]
    5. Applied *-un-lft-identity11.2

      \[\leadsto \]
    6. Applied times-frac11.2

      \[\leadsto \]
    7. Applied associate-*r*9.1

      \[\leadsto \]
    8. Simplified9.1

      \[\leadsto \]
    9. Using strategy rm
    10. Applied add-cube-cbrt9.1

      \[\leadsto \]
    11. Applied cbrt-prod9.1

      \[\leadsto \]
    12. Applied *-un-lft-identity9.1

      \[\leadsto \]
    13. Applied times-frac9.2

      \[\leadsto \]
    14. Applied associate-*r*9.0

      \[\leadsto \]
    15. Simplified9.0

      \[\leadsto \]
  3. Recombined 2 regimes into one program.
  4. Final simplification10.0

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

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