Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A

Percentage Accurate: 85.3% → 99.5%
Time: 10.1s
Alternatives: 12
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (z - a));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (z - a));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}

Alternative 1: 99.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+260}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- z a))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+260)))
     (fma (/ y (- z a)) (- z t) x)
     (+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+260)) {
		tmp = fma((y / (z - a)), (z - t), x);
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+260))
		tmp = fma(Float64(y / Float64(z - a)), Float64(z - t), x);
	else
		tmp = Float64(t_1 + x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+260]], $MachinePrecision]], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+260}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 4.9999999999999996e260 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 44.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative44.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a} + x} \]
      2. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def99.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)} \]

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999996e260

    1. Initial program 99.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} \leq -\infty \lor \neg \left(\frac{y \cdot \left(z - t\right)}{z - a} \leq 5 \cdot 10^{+260}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\ \end{array} \]

Alternative 2: 99.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+260}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1 + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- z a))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+260)))
     (+ x (/ (- z t) (/ (- z a) y)))
     (+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+260)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+260)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * (z - t)) / (z - a)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 5e+260):
		tmp = x + ((z - t) / ((z - a) / y))
	else:
		tmp = t_1 + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+260))
		tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y)));
	else
		tmp = Float64(t_1 + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * (z - t)) / (z - a);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 5e+260)))
		tmp = x + ((z - t) / ((z - a) / y));
	else
		tmp = t_1 + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+260]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+260}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t_1 + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 4.9999999999999996e260 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 44.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative44.9%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999996e260

    1. Initial program 99.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} \leq -\infty \lor \neg \left(\frac{y \cdot \left(z - t\right)}{z - a} \leq 5 \cdot 10^{+260}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\ \end{array} \]

Alternative 3: 79.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{z - a}\\ t_2 := x + y \cdot \frac{z - t}{z}\\ t_3 := x + y \cdot \frac{t}{a}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{+186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+61}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y (- z a)))))
        (t_2 (+ x (* y (/ (- z t) z))))
        (t_3 (+ x (* y (/ t a)))))
   (if (<= z -1.5e+186)
     t_2
     (if (<= z -1.05e-20)
       t_1
       (if (<= z 2.75e-176)
         t_3
         (if (<= z 6.4e-61) t_1 (if (<= z 2.2e+61) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (z - a)));
	double t_2 = x + (y * ((z - t) / z));
	double t_3 = x + (y * (t / a));
	double tmp;
	if (z <= -1.5e+186) {
		tmp = t_2;
	} else if (z <= -1.05e-20) {
		tmp = t_1;
	} else if (z <= 2.75e-176) {
		tmp = t_3;
	} else if (z <= 6.4e-61) {
		tmp = t_1;
	} else if (z <= 2.2e+61) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (z * (y / (z - a)))
    t_2 = x + (y * ((z - t) / z))
    t_3 = x + (y * (t / a))
    if (z <= (-1.5d+186)) then
        tmp = t_2
    else if (z <= (-1.05d-20)) then
        tmp = t_1
    else if (z <= 2.75d-176) then
        tmp = t_3
    else if (z <= 6.4d-61) then
        tmp = t_1
    else if (z <= 2.2d+61) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (z - a)));
	double t_2 = x + (y * ((z - t) / z));
	double t_3 = x + (y * (t / a));
	double tmp;
	if (z <= -1.5e+186) {
		tmp = t_2;
	} else if (z <= -1.05e-20) {
		tmp = t_1;
	} else if (z <= 2.75e-176) {
		tmp = t_3;
	} else if (z <= 6.4e-61) {
		tmp = t_1;
	} else if (z <= 2.2e+61) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / (z - a)))
	t_2 = x + (y * ((z - t) / z))
	t_3 = x + (y * (t / a))
	tmp = 0
	if z <= -1.5e+186:
		tmp = t_2
	elif z <= -1.05e-20:
		tmp = t_1
	elif z <= 2.75e-176:
		tmp = t_3
	elif z <= 6.4e-61:
		tmp = t_1
	elif z <= 2.2e+61:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / Float64(z - a))))
	t_2 = Float64(x + Float64(y * Float64(Float64(z - t) / z)))
	t_3 = Float64(x + Float64(y * Float64(t / a)))
	tmp = 0.0
	if (z <= -1.5e+186)
		tmp = t_2;
	elseif (z <= -1.05e-20)
		tmp = t_1;
	elseif (z <= 2.75e-176)
		tmp = t_3;
	elseif (z <= 6.4e-61)
		tmp = t_1;
	elseif (z <= 2.2e+61)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / (z - a)));
	t_2 = x + (y * ((z - t) / z));
	t_3 = x + (y * (t / a));
	tmp = 0.0;
	if (z <= -1.5e+186)
		tmp = t_2;
	elseif (z <= -1.05e-20)
		tmp = t_1;
	elseif (z <= 2.75e-176)
		tmp = t_3;
	elseif (z <= 6.4e-61)
		tmp = t_1;
	elseif (z <= 2.2e+61)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+186], t$95$2, If[LessEqual[z, -1.05e-20], t$95$1, If[LessEqual[z, 2.75e-176], t$95$3, If[LessEqual[z, 6.4e-61], t$95$1, If[LessEqual[z, 2.2e+61], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{z - a}\\
t_2 := x + y \cdot \frac{z - t}{z}\\
t_3 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+186}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+61}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.49999999999999991e186 or 2.2e61 < z

    1. Initial program 71.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative71.9%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-/l*90.3%

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]
    4. Taylor expanded in z around inf 82.6%

      \[\leadsto x + \frac{z - t}{\color{blue}{\frac{z}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/91.1%

        \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
    6. Applied egg-rr91.1%

      \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]

    if -1.49999999999999991e186 < z < -1.0499999999999999e-20 or 2.75e-176 < z < 6.4000000000000003e-61

    1. Initial program 91.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in t around 0 79.9%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    3. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-*l/86.8%

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot z} + x \]
      3. *-commutative86.8%

        \[\leadsto \color{blue}{z \cdot \frac{y}{z - a}} + x \]
    4. Simplified86.8%

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]

    if -1.0499999999999999e-20 < z < 2.75e-176 or 6.4000000000000003e-61 < z < 2.2e61

    1. Initial program 95.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around 0 81.6%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    3. Step-by-step derivation
      1. +-commutative81.6%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*85.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified85.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. associate-/r/86.0%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    6. Applied egg-rr86.0%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+186}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-20}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-61}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]

Alternative 4: 79.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{z - a}\\ t_2 := x + y \cdot \frac{t}{a}\\ \mathbf{if}\;z \leq -2.2 \cdot 10^{+185}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y (- z a))))) (t_2 (+ x (* y (/ t a)))))
   (if (<= z -2.2e+185)
     (+ x (/ y (/ z (- z t))))
     (if (<= z -1.9e-22)
       t_1
       (if (<= z 2.75e-176)
         t_2
         (if (<= z 8.6e-60)
           t_1
           (if (<= z 1.95e+61) t_2 (+ x (* y (/ (- z t) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (z - a)));
	double t_2 = x + (y * (t / a));
	double tmp;
	if (z <= -2.2e+185) {
		tmp = x + (y / (z / (z - t)));
	} else if (z <= -1.9e-22) {
		tmp = t_1;
	} else if (z <= 2.75e-176) {
		tmp = t_2;
	} else if (z <= 8.6e-60) {
		tmp = t_1;
	} else if (z <= 1.95e+61) {
		tmp = t_2;
	} else {
		tmp = x + (y * ((z - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z * (y / (z - a)))
    t_2 = x + (y * (t / a))
    if (z <= (-2.2d+185)) then
        tmp = x + (y / (z / (z - t)))
    else if (z <= (-1.9d-22)) then
        tmp = t_1
    else if (z <= 2.75d-176) then
        tmp = t_2
    else if (z <= 8.6d-60) then
        tmp = t_1
    else if (z <= 1.95d+61) then
        tmp = t_2
    else
        tmp = x + (y * ((z - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (z - a)));
	double t_2 = x + (y * (t / a));
	double tmp;
	if (z <= -2.2e+185) {
		tmp = x + (y / (z / (z - t)));
	} else if (z <= -1.9e-22) {
		tmp = t_1;
	} else if (z <= 2.75e-176) {
		tmp = t_2;
	} else if (z <= 8.6e-60) {
		tmp = t_1;
	} else if (z <= 1.95e+61) {
		tmp = t_2;
	} else {
		tmp = x + (y * ((z - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / (z - a)))
	t_2 = x + (y * (t / a))
	tmp = 0
	if z <= -2.2e+185:
		tmp = x + (y / (z / (z - t)))
	elif z <= -1.9e-22:
		tmp = t_1
	elif z <= 2.75e-176:
		tmp = t_2
	elif z <= 8.6e-60:
		tmp = t_1
	elif z <= 1.95e+61:
		tmp = t_2
	else:
		tmp = x + (y * ((z - t) / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / Float64(z - a))))
	t_2 = Float64(x + Float64(y * Float64(t / a)))
	tmp = 0.0
	if (z <= -2.2e+185)
		tmp = Float64(x + Float64(y / Float64(z / Float64(z - t))));
	elseif (z <= -1.9e-22)
		tmp = t_1;
	elseif (z <= 2.75e-176)
		tmp = t_2;
	elseif (z <= 8.6e-60)
		tmp = t_1;
	elseif (z <= 1.95e+61)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / (z - a)));
	t_2 = x + (y * (t / a));
	tmp = 0.0;
	if (z <= -2.2e+185)
		tmp = x + (y / (z / (z - t)));
	elseif (z <= -1.9e-22)
		tmp = t_1;
	elseif (z <= 2.75e-176)
		tmp = t_2;
	elseif (z <= 8.6e-60)
		tmp = t_1;
	elseif (z <= 1.95e+61)
		tmp = t_2;
	else
		tmp = x + (y * ((z - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+185], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.9e-22], t$95$1, If[LessEqual[z, 2.75e-176], t$95$2, If[LessEqual[z, 8.6e-60], t$95$1, If[LessEqual[z, 1.95e+61], t$95$2, N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{z - a}\\
t_2 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+185}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 8.6 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+61}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.2000000000000001e185

    1. Initial program 63.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in a around 0 57.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.7%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z} + x} \]
      2. associate-/l*91.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified91.2%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]

    if -2.2000000000000001e185 < z < -1.90000000000000012e-22 or 2.75e-176 < z < 8.6000000000000001e-60

    1. Initial program 91.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in t around 0 79.9%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    3. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-*l/86.8%

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot z} + x \]
      3. *-commutative86.8%

        \[\leadsto \color{blue}{z \cdot \frac{y}{z - a}} + x \]
    4. Simplified86.8%

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]

    if -1.90000000000000012e-22 < z < 2.75e-176 or 8.6000000000000001e-60 < z < 1.94999999999999994e61

    1. Initial program 95.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around 0 81.6%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    3. Step-by-step derivation
      1. +-commutative81.6%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*85.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified85.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. associate-/r/86.0%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    6. Applied egg-rr86.0%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]

    if 1.94999999999999994e61 < z

    1. Initial program 77.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative77.1%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-/l*92.8%

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]
    4. Taylor expanded in z around inf 83.9%

      \[\leadsto x + \frac{z - t}{\color{blue}{\frac{z}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/91.0%

        \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
    6. Applied egg-rr91.0%

      \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+185}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-22}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-176}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-60}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]

Alternative 5: 58.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;y \leq -2.7 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{+66}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-242}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+114}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y a) (- t z))))
   (if (<= y -2.7e+134)
     t_1
     (if (<= y -7.2e+66)
       (+ y x)
       (if (<= y -5.4e+66)
         t_1
         (if (<= y -2.4e-242) x (if (<= y 1.15e+114) (+ y x) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (y <= -2.7e+134) {
		tmp = t_1;
	} else if (y <= -7.2e+66) {
		tmp = y + x;
	} else if (y <= -5.4e+66) {
		tmp = t_1;
	} else if (y <= -2.4e-242) {
		tmp = x;
	} else if (y <= 1.15e+114) {
		tmp = y + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / a) * (t - z)
    if (y <= (-2.7d+134)) then
        tmp = t_1
    else if (y <= (-7.2d+66)) then
        tmp = y + x
    else if (y <= (-5.4d+66)) then
        tmp = t_1
    else if (y <= (-2.4d-242)) then
        tmp = x
    else if (y <= 1.15d+114) then
        tmp = y + x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / a) * (t - z);
	double tmp;
	if (y <= -2.7e+134) {
		tmp = t_1;
	} else if (y <= -7.2e+66) {
		tmp = y + x;
	} else if (y <= -5.4e+66) {
		tmp = t_1;
	} else if (y <= -2.4e-242) {
		tmp = x;
	} else if (y <= 1.15e+114) {
		tmp = y + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / a) * (t - z)
	tmp = 0
	if y <= -2.7e+134:
		tmp = t_1
	elif y <= -7.2e+66:
		tmp = y + x
	elif y <= -5.4e+66:
		tmp = t_1
	elif y <= -2.4e-242:
		tmp = x
	elif y <= 1.15e+114:
		tmp = y + x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / a) * Float64(t - z))
	tmp = 0.0
	if (y <= -2.7e+134)
		tmp = t_1;
	elseif (y <= -7.2e+66)
		tmp = Float64(y + x);
	elseif (y <= -5.4e+66)
		tmp = t_1;
	elseif (y <= -2.4e-242)
		tmp = x;
	elseif (y <= 1.15e+114)
		tmp = Float64(y + x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / a) * (t - z);
	tmp = 0.0;
	if (y <= -2.7e+134)
		tmp = t_1;
	elseif (y <= -7.2e+66)
		tmp = y + x;
	elseif (y <= -5.4e+66)
		tmp = t_1;
	elseif (y <= -2.4e-242)
		tmp = x;
	elseif (y <= 1.15e+114)
		tmp = y + x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+134], t$95$1, If[LessEqual[y, -7.2e+66], N[(y + x), $MachinePrecision], If[LessEqual[y, -5.4e+66], t$95$1, If[LessEqual[y, -2.4e-242], x, If[LessEqual[y, 1.15e+114], N[(y + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -7.2 \cdot 10^{+66}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;y \leq -5.4 \cdot 10^{+66}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-242}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+114}:\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7e134 or -7.2e66 < y < -5.4e66 or 1.15e114 < y

    1. Initial program 68.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in a around inf 55.1%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
    3. Step-by-step derivation
      1. mul-1-neg55.1%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot \left(z - t\right)}{a}\right)} \]
      2. unsub-neg55.1%

        \[\leadsto \color{blue}{x - \frac{y \cdot \left(z - t\right)}{a}} \]
      3. associate-/l*62.2%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    4. Simplified62.2%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    5. Taylor expanded in x around 0 47.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/56.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{y}{a} \cdot \left(z - t\right)\right)} \]
      2. sub-neg56.8%

        \[\leadsto -1 \cdot \left(\frac{y}{a} \cdot \color{blue}{\left(z + \left(-t\right)\right)}\right) \]
      3. distribute-rgt-out50.9%

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{y}{a} + \left(-t\right) \cdot \frac{y}{a}\right)} \]
      4. +-commutative50.9%

        \[\leadsto -1 \cdot \color{blue}{\left(\left(-t\right) \cdot \frac{y}{a} + z \cdot \frac{y}{a}\right)} \]
      5. *-commutative50.9%

        \[\leadsto -1 \cdot \left(\left(-t\right) \cdot \frac{y}{a} + \color{blue}{\frac{y}{a} \cdot z}\right) \]
      6. associate-*l/50.3%

        \[\leadsto -1 \cdot \left(\left(-t\right) \cdot \frac{y}{a} + \color{blue}{\frac{y \cdot z}{a}}\right) \]
      7. distribute-rgt-in50.3%

        \[\leadsto \color{blue}{\left(\left(-t\right) \cdot \frac{y}{a}\right) \cdot -1 + \frac{y \cdot z}{a} \cdot -1} \]
      8. distribute-lft-neg-out50.3%

        \[\leadsto \color{blue}{\left(-t \cdot \frac{y}{a}\right)} \cdot -1 + \frac{y \cdot z}{a} \cdot -1 \]
      9. distribute-lft-neg-in50.3%

        \[\leadsto \color{blue}{\left(-\left(t \cdot \frac{y}{a}\right) \cdot -1\right)} + \frac{y \cdot z}{a} \cdot -1 \]
      10. distribute-rgt-neg-in50.3%

        \[\leadsto \color{blue}{\left(t \cdot \frac{y}{a}\right) \cdot \left(--1\right)} + \frac{y \cdot z}{a} \cdot -1 \]
      11. metadata-eval50.3%

        \[\leadsto \left(t \cdot \frac{y}{a}\right) \cdot \color{blue}{1} + \frac{y \cdot z}{a} \cdot -1 \]
      12. *-rgt-identity50.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + \frac{y \cdot z}{a} \cdot -1 \]
      13. *-commutative50.3%

        \[\leadsto t \cdot \frac{y}{a} + \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
      14. mul-1-neg50.3%

        \[\leadsto t \cdot \frac{y}{a} + \color{blue}{\left(-\frac{y \cdot z}{a}\right)} \]
      15. sub-neg50.3%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a} - \frac{y \cdot z}{a}} \]
      16. associate-*l/50.9%

        \[\leadsto t \cdot \frac{y}{a} - \color{blue}{\frac{y}{a} \cdot z} \]
      17. *-commutative50.9%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} - \frac{y}{a} \cdot z \]
      18. distribute-lft-out--56.8%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - z\right)} \]
    7. Simplified56.8%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - z\right)} \]

    if -2.7e134 < y < -7.2e66 or -2.4000000000000001e-242 < y < 1.15e114

    1. Initial program 91.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around inf 81.8%

      \[\leadsto \color{blue}{x + y} \]
    3. Step-by-step derivation
      1. +-commutative81.8%

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified81.8%

      \[\leadsto \color{blue}{y + x} \]

    if -5.4e66 < y < -2.4000000000000001e-242

    1. Initial program 99.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in x around inf 75.3%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+134}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{+66}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-242}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+114}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 6: 93.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+133}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+111}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7e+133)
   (+ x (/ y (/ z (- z t))))
   (if (<= z 5.8e+111)
     (+ (/ (* y (- z t)) (- z a)) x)
     (+ x (* y (/ (- z t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7e+133) {
		tmp = x + (y / (z / (z - t)));
	} else if (z <= 5.8e+111) {
		tmp = ((y * (z - t)) / (z - a)) + x;
	} else {
		tmp = x + (y * ((z - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-7d+133)) then
        tmp = x + (y / (z / (z - t)))
    else if (z <= 5.8d+111) then
        tmp = ((y * (z - t)) / (z - a)) + x
    else
        tmp = x + (y * ((z - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7e+133) {
		tmp = x + (y / (z / (z - t)));
	} else if (z <= 5.8e+111) {
		tmp = ((y * (z - t)) / (z - a)) + x;
	} else {
		tmp = x + (y * ((z - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7e+133:
		tmp = x + (y / (z / (z - t)))
	elif z <= 5.8e+111:
		tmp = ((y * (z - t)) / (z - a)) + x
	else:
		tmp = x + (y * ((z - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7e+133)
		tmp = Float64(x + Float64(y / Float64(z / Float64(z - t))));
	elseif (z <= 5.8e+111)
		tmp = Float64(Float64(Float64(y * Float64(z - t)) / Float64(z - a)) + x);
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7e+133)
		tmp = x + (y / (z / (z - t)));
	elseif (z <= 5.8e+111)
		tmp = ((y * (z - t)) / (z - a)) + x;
	else
		tmp = x + (y * ((z - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+133], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+111], N[(N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+133}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+111}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.9999999999999997e133

    1. Initial program 65.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in a around 0 60.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative60.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z} + x} \]
      2. associate-/l*92.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified92.7%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]

    if -6.9999999999999997e133 < z < 5.7999999999999999e111

    1. Initial program 94.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]

    if 5.7999999999999999e111 < z

    1. Initial program 73.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative73.5%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-/l*91.1%

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified91.1%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]
    4. Taylor expanded in z around inf 86.6%

      \[\leadsto x + \frac{z - t}{\color{blue}{\frac{z}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/95.5%

        \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
    6. Applied egg-rr95.5%

      \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+133}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+111}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]

Alternative 7: 81.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-19} \lor \neg \left(z \leq 1.6 \cdot 10^{+63}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2.3e-19) (not (<= z 1.6e+63)))
   (+ x (* y (/ (- z t) z)))
   (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.3e-19) || !(z <= 1.6e+63)) {
		tmp = x + (y * ((z - t) / z));
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-2.3d-19)) .or. (.not. (z <= 1.6d+63))) then
        tmp = x + (y * ((z - t) / z))
    else
        tmp = x + (y * (t / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.3e-19) || !(z <= 1.6e+63)) {
		tmp = x + (y * ((z - t) / z));
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2.3e-19) or not (z <= 1.6e+63):
		tmp = x + (y * ((z - t) / z))
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2.3e-19) || !(z <= 1.6e+63))
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z)));
	else
		tmp = Float64(x + Float64(y * Float64(t / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2.3e-19) || ~((z <= 1.6e+63)))
		tmp = x + (y * ((z - t) / z));
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-19], N[Not[LessEqual[z, 1.6e+63]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-19} \lor \neg \left(z \leq 1.6 \cdot 10^{+63}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2999999999999998e-19 or 1.60000000000000006e63 < z

    1. Initial program 76.3%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative76.3%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-/l*92.3%

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]
    4. Taylor expanded in z around inf 80.3%

      \[\leadsto x + \frac{z - t}{\color{blue}{\frac{z}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/85.7%

        \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]
    6. Applied egg-rr85.7%

      \[\leadsto x + \color{blue}{\frac{z - t}{z} \cdot y} \]

    if -2.2999999999999998e-19 < z < 1.60000000000000006e63

    1. Initial program 96.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around 0 79.8%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    3. Step-by-step derivation
      1. +-commutative79.8%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*83.3%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified83.3%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. associate-/r/83.3%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    6. Applied egg-rr83.3%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification84.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-19} \lor \neg \left(z \leq 1.6 \cdot 10^{+63}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 8: 87.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z - a}\\ \mathbf{if}\;t \leq -8.2 \cdot 10^{-13} \lor \neg \left(t \leq 6.8 \cdot 10^{+62}\right):\\ \;\;\;\;x - t \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (- z a))))
   (if (or (<= t -8.2e-13) (not (<= t 6.8e+62)))
     (- x (* t t_1))
     (+ x (* z t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z - a);
	double tmp;
	if ((t <= -8.2e-13) || !(t <= 6.8e+62)) {
		tmp = x - (t * t_1);
	} else {
		tmp = x + (z * t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (z - a)
    if ((t <= (-8.2d-13)) .or. (.not. (t <= 6.8d+62))) then
        tmp = x - (t * t_1)
    else
        tmp = x + (z * t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z - a);
	double tmp;
	if ((t <= -8.2e-13) || !(t <= 6.8e+62)) {
		tmp = x - (t * t_1);
	} else {
		tmp = x + (z * t_1);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (z - a)
	tmp = 0
	if (t <= -8.2e-13) or not (t <= 6.8e+62):
		tmp = x - (t * t_1)
	else:
		tmp = x + (z * t_1)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(z - a))
	tmp = 0.0
	if ((t <= -8.2e-13) || !(t <= 6.8e+62))
		tmp = Float64(x - Float64(t * t_1));
	else
		tmp = Float64(x + Float64(z * t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (z - a);
	tmp = 0.0;
	if ((t <= -8.2e-13) || ~((t <= 6.8e+62)))
		tmp = x - (t * t_1);
	else
		tmp = x + (z * t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -8.2e-13], N[Not[LessEqual[t, 6.8e+62]], $MachinePrecision]], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z - a}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-13} \lor \neg \left(t \leq 6.8 \cdot 10^{+62}\right):\\
\;\;\;\;x - t \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.2000000000000004e-13 or 6.80000000000000028e62 < t

    1. Initial program 91.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in t around inf 85.5%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    3. Step-by-step derivation
      1. associate-*r/91.0%

        \[\leadsto x + -1 \cdot \color{blue}{\left(t \cdot \frac{y}{z - a}\right)} \]
      2. neg-mul-191.0%

        \[\leadsto x + \color{blue}{\left(-t \cdot \frac{y}{z - a}\right)} \]
      3. distribute-rgt-neg-in91.0%

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{y}{z - a}\right)} \]
      4. distribute-neg-frac91.0%

        \[\leadsto x + t \cdot \color{blue}{\frac{-y}{z - a}} \]
    4. Simplified91.0%

      \[\leadsto x + \color{blue}{t \cdot \frac{-y}{z - a}} \]
    5. Taylor expanded in x around 0 85.5%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z - a}} \]
    6. Step-by-step derivation
      1. mul-1-neg85.5%

        \[\leadsto x + \color{blue}{\left(-\frac{t \cdot y}{z - a}\right)} \]
      2. associate-*r/91.0%

        \[\leadsto x + \left(-\color{blue}{t \cdot \frac{y}{z - a}}\right) \]
      3. sub-neg91.0%

        \[\leadsto \color{blue}{x - t \cdot \frac{y}{z - a}} \]
    7. Simplified91.0%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z - a}} \]

    if -8.2000000000000004e-13 < t < 6.80000000000000028e62

    1. Initial program 83.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in t around 0 77.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    3. Step-by-step derivation
      1. +-commutative77.6%

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-*l/89.6%

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot z} + x \]
      3. *-commutative89.6%

        \[\leadsto \color{blue}{z \cdot \frac{y}{z - a}} + x \]
    4. Simplified89.6%

      \[\leadsto \color{blue}{z \cdot \frac{y}{z - a} + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-13} \lor \neg \left(t \leq 6.8 \cdot 10^{+62}\right):\\ \;\;\;\;x - t \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \end{array} \]

Alternative 9: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+81} \lor \neg \left(z \leq 2.1 \cdot 10^{+61}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -3e+81) (not (<= z 2.1e+61))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3e+81) || !(z <= 2.1e+61)) {
		tmp = y + x;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-3d+81)) .or. (.not. (z <= 2.1d+61))) then
        tmp = y + x
    else
        tmp = x + ((y * t) / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3e+81) || !(z <= 2.1e+61)) {
		tmp = y + x;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -3e+81) or not (z <= 2.1e+61):
		tmp = y + x
	else:
		tmp = x + ((y * t) / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -3e+81) || !(z <= 2.1e+61))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(Float64(y * t) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -3e+81) || ~((z <= 2.1e+61)))
		tmp = y + x;
	else
		tmp = x + ((y * t) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+81], N[Not[LessEqual[z, 2.1e+61]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+81} \lor \neg \left(z \leq 2.1 \cdot 10^{+61}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.99999999999999997e81 or 2.1000000000000001e61 < z

    1. Initial program 72.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around inf 81.2%

      \[\leadsto \color{blue}{x + y} \]
    3. Step-by-step derivation
      1. +-commutative81.2%

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified81.2%

      \[\leadsto \color{blue}{y + x} \]

    if -2.99999999999999997e81 < z < 2.1000000000000001e61

    1. Initial program 96.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around 0 78.1%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+81} \lor \neg \left(z \leq 2.1 \cdot 10^{+61}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 10: 76.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+81} \lor \neg \left(z \leq 1.3 \cdot 10^{+62}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -7.6e+81) (not (<= z 1.3e+62))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7.6e+81) || !(z <= 1.3e+62)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-7.6d+81)) .or. (.not. (z <= 1.3d+62))) then
        tmp = y + x
    else
        tmp = x + (y * (t / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7.6e+81) || !(z <= 1.3e+62)) {
		tmp = y + x;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -7.6e+81) or not (z <= 1.3e+62):
		tmp = y + x
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -7.6e+81) || !(z <= 1.3e+62))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(y * Float64(t / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -7.6e+81) || ~((z <= 1.3e+62)))
		tmp = y + x;
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.6e+81], N[Not[LessEqual[z, 1.3e+62]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+81} \lor \neg \left(z \leq 1.3 \cdot 10^{+62}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.599999999999999e81 or 1.29999999999999992e62 < z

    1. Initial program 72.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around inf 81.2%

      \[\leadsto \color{blue}{x + y} \]
    3. Step-by-step derivation
      1. +-commutative81.2%

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified81.2%

      \[\leadsto \color{blue}{y + x} \]

    if -7.599999999999999e81 < z < 1.29999999999999992e62

    1. Initial program 96.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around 0 78.1%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    3. Step-by-step derivation
      1. +-commutative78.1%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*80.8%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified80.8%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. associate-/r/81.5%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    6. Applied egg-rr81.5%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+81} \lor \neg \left(z \leq 1.3 \cdot 10^{+62}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 11: 63.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+152}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+135}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6e+152) x (if (<= a 3.7e+135) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6e+152) {
		tmp = x;
	} else if (a <= 3.7e+135) {
		tmp = y + x;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-6d+152)) then
        tmp = x
    else if (a <= 3.7d+135) then
        tmp = y + x
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6e+152) {
		tmp = x;
	} else if (a <= 3.7e+135) {
		tmp = y + x;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6e+152:
		tmp = x
	elif a <= 3.7e+135:
		tmp = y + x
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6e+152)
		tmp = x;
	elseif (a <= 3.7e+135)
		tmp = Float64(y + x);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -6e+152)
		tmp = x;
	elseif (a <= 3.7e+135)
		tmp = y + x;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e+152], x, If[LessEqual[a, 3.7e+135], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+152}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.7 \cdot 10^{+135}:\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.99999999999999981e152 or 3.69999999999999997e135 < a

    1. Initial program 87.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in x around inf 64.4%

      \[\leadsto \color{blue}{x} \]

    if -5.99999999999999981e152 < a < 3.69999999999999997e135

    1. Initial program 85.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Taylor expanded in z around inf 69.1%

      \[\leadsto \color{blue}{x + y} \]
    3. Step-by-step derivation
      1. +-commutative69.1%

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified69.1%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+152}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+135}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 49.7% accurate, 11.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 86.4%

    \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  2. Taylor expanded in x around inf 53.5%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification53.5%

    \[\leadsto x \]

Developer target: 98.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{z - a}{z - t}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a):
	return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((z - a) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}

Reproduce

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

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

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