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

Percentage Accurate: 86.1% → 99.7%
Time: 10.9s
Alternatives: 17
Speedup: 1.0×

Specification

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

\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\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 17 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: 86.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{a - z}\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+307}:\\ \;\;\;\;x - \frac{t \cdot \left(z - y\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (- a z))) (t_2 (/ (* (- y z) t) (- a z))))
   (if (<= t_2 (- INFINITY))
     (fma (- y z) t_1 x)
     (if (<= t_2 1e+307)
       (- x (/ (* t (- z y)) (- a z)))
       (+ x (* (- y z) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a - z);
	double t_2 = ((y - z) * t) / (a - z);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma((y - z), t_1, x);
	} else if (t_2 <= 1e+307) {
		tmp = x - ((t * (z - y)) / (a - z));
	} else {
		tmp = x + ((y - z) * t_1);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a - z))
	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(Float64(y - z), t_1, x);
	elseif (t_2 <= 1e+307)
		tmp = Float64(x - Float64(Float64(t * Float64(z - y)) / Float64(a - z)));
	else
		tmp = Float64(x + Float64(Float64(y - z) * t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(x - N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{a - z}\\
t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\

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

\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\_1\\


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

    1. Initial program 42.3%

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306

    1. Initial program 99.9%

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

    if 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 37.4%

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

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

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

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

Alternative 2: 99.7% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot \left(z - y\right)}{a - z}\\


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

    1. Initial program 40.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306

    1. Initial program 99.9%

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

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

Alternative 3: 61.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+85} \lor \neg \left(y \leq 2 \cdot 10^{-6}\right) \land \left(y \leq 1.48 \cdot 10^{+66} \lor \neg \left(y \leq 1.9 \cdot 10^{+130}\right)\right):\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -5.6e+85)
         (and (not (<= y 2e-6)) (or (<= y 1.48e+66) (not (<= y 1.9e+130)))))
   (* t (/ y (- a z)))
   (+ t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130)))) {
		tmp = t * (y / (a - z));
	} else {
		tmp = t + 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 ((y <= (-5.6d+85)) .or. (.not. (y <= 2d-6)) .and. (y <= 1.48d+66) .or. (.not. (y <= 1.9d+130))) then
        tmp = t * (y / (a - z))
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130)))) {
		tmp = t * (y / (a - z));
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -5.6e+85) or (not (y <= 2e-6) and ((y <= 1.48e+66) or not (y <= 1.9e+130))):
		tmp = t * (y / (a - z))
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130))))
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -5.6e+85) || (~((y <= 2e-6)) && ((y <= 1.48e+66) || ~((y <= 1.9e+130)))))
		tmp = t * (y / (a - z));
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.6e+85], And[N[Not[LessEqual[y, 2e-6]], $MachinePrecision], Or[LessEqual[y, 1.48e+66], N[Not[LessEqual[y, 1.9e+130]], $MachinePrecision]]]], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+85} \lor \neg \left(y \leq 2 \cdot 10^{-6}\right) \land \left(y \leq 1.48 \cdot 10^{+66} \lor \neg \left(y \leq 1.9 \cdot 10^{+130}\right)\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.5999999999999998e85 or 1.99999999999999991e-6 < y < 1.47999999999999998e66 or 1.9000000000000001e130 < y

    1. Initial program 80.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 70.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, \frac{y - z}{x \cdot \left(a - z\right)}, 1\right)} \]
      4. *-commutative70.7%

        \[\leadsto x \cdot \mathsf{fma}\left(t, \frac{y - z}{\color{blue}{\left(a - z\right) \cdot x}}, 1\right) \]
      5. associate-/r*73.7%

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\frac{\frac{y - z}{a - z}}{x}}, 1\right) \]
    7. Simplified73.7%

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, \frac{\frac{y - z}{a - z}}{x}, 1\right)} \]
    8. Taylor expanded in y around inf 57.9%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    9. Step-by-step derivation
      1. associate-/l*58.9%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified58.9%

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

    if -5.5999999999999998e85 < y < 1.99999999999999991e-6 or 1.47999999999999998e66 < y < 1.9000000000000001e130

    1. Initial program 88.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+85} \lor \neg \left(y \leq 2 \cdot 10^{-6}\right) \land \left(y \leq 1.48 \cdot 10^{+66} \lor \neg \left(y \leq 1.9 \cdot 10^{+130}\right)\right):\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{a - z}\\ \mathbf{if}\;y \leq -9.8 \cdot 10^{+94}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-6}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+130}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ t (- a z)))))
   (if (<= y -9.8e+94)
     t_1
     (if (<= y 2e-6)
       (+ t x)
       (if (<= y 1.12e+66)
         (* t (/ y (- a z)))
         (if (<= y 1.85e+130) (+ t x) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / (a - z));
	double tmp;
	if (y <= -9.8e+94) {
		tmp = t_1;
	} else if (y <= 2e-6) {
		tmp = t + x;
	} else if (y <= 1.12e+66) {
		tmp = t * (y / (a - z));
	} else if (y <= 1.85e+130) {
		tmp = t + 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 * (t / (a - z))
    if (y <= (-9.8d+94)) then
        tmp = t_1
    else if (y <= 2d-6) then
        tmp = t + x
    else if (y <= 1.12d+66) then
        tmp = t * (y / (a - z))
    else if (y <= 1.85d+130) then
        tmp = t + 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 * (t / (a - z));
	double tmp;
	if (y <= -9.8e+94) {
		tmp = t_1;
	} else if (y <= 2e-6) {
		tmp = t + x;
	} else if (y <= 1.12e+66) {
		tmp = t * (y / (a - z));
	} else if (y <= 1.85e+130) {
		tmp = t + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (t / (a - z))
	tmp = 0
	if y <= -9.8e+94:
		tmp = t_1
	elif y <= 2e-6:
		tmp = t + x
	elif y <= 1.12e+66:
		tmp = t * (y / (a - z))
	elif y <= 1.85e+130:
		tmp = t + x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (y <= -9.8e+94)
		tmp = t_1;
	elseif (y <= 2e-6)
		tmp = Float64(t + x);
	elseif (y <= 1.12e+66)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (y <= 1.85e+130)
		tmp = Float64(t + x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (t / (a - z));
	tmp = 0.0;
	if (y <= -9.8e+94)
		tmp = t_1;
	elseif (y <= 2e-6)
		tmp = t + x;
	elseif (y <= 1.12e+66)
		tmp = t * (y / (a - z));
	elseif (y <= 1.85e+130)
		tmp = t + x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.8e+94], t$95$1, If[LessEqual[y, 2e-6], N[(t + x), $MachinePrecision], If[LessEqual[y, 1.12e+66], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+130], N[(t + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;y \leq 1.85 \cdot 10^{+130}:\\
\;\;\;\;t + x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.7999999999999998e94 or 1.8500000000000001e130 < y

    1. Initial program 78.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 75.6%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative87.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Simplified87.2%

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} + \frac{x}{y}\right)} \]
    9. Taylor expanded in y around inf 57.9%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    10. Step-by-step derivation
      1. associate-*l/64.0%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative64.0%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    11. Simplified64.0%

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

    if -9.7999999999999998e94 < y < 1.99999999999999991e-6 or 1.12e66 < y < 1.8500000000000001e130

    1. Initial program 88.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.9%

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

    if 1.99999999999999991e-6 < y < 1.12e66

    1. Initial program 88.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 81.9%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, \frac{y - z}{x \cdot \left(a - z\right)}, 1\right)} \]
      4. *-commutative76.2%

        \[\leadsto x \cdot \mathsf{fma}\left(t, \frac{y - z}{\color{blue}{\left(a - z\right) \cdot x}}, 1\right) \]
      5. associate-/r*76.2%

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\frac{\frac{y - z}{a - z}}{x}}, 1\right) \]
    7. Simplified76.2%

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, \frac{\frac{y - z}{a - z}}{x}, 1\right)} \]
    8. Taylor expanded in y around inf 58.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    9. Step-by-step derivation
      1. associate-/l*58.4%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    10. Simplified58.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+94}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-6}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+130}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -35:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 10^{-33}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+25}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a)))))
   (if (<= z -35.0)
     (+ t x)
     (if (<= z 3.2e-110)
       t_1
       (if (<= z 1e-33)
         (* y (/ t (- a z)))
         (if (<= z 1.35e+25) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -35.0) {
		tmp = t + x;
	} else if (z <= 3.2e-110) {
		tmp = t_1;
	} else if (z <= 1e-33) {
		tmp = y * (t / (a - z));
	} else if (z <= 1.35e+25) {
		tmp = t_1;
	} else {
		tmp = t + 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) :: t_1
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    if (z <= (-35.0d0)) then
        tmp = t + x
    else if (z <= 3.2d-110) then
        tmp = t_1
    else if (z <= 1d-33) then
        tmp = y * (t / (a - z))
    else if (z <= 1.35d+25) then
        tmp = t_1
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -35.0) {
		tmp = t + x;
	} else if (z <= 3.2e-110) {
		tmp = t_1;
	} else if (z <= 1e-33) {
		tmp = y * (t / (a - z));
	} else if (z <= 1.35e+25) {
		tmp = t_1;
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	tmp = 0
	if z <= -35.0:
		tmp = t + x
	elif z <= 3.2e-110:
		tmp = t_1
	elif z <= 1e-33:
		tmp = y * (t / (a - z))
	elif z <= 1.35e+25:
		tmp = t_1
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (z <= -35.0)
		tmp = Float64(t + x);
	elseif (z <= 3.2e-110)
		tmp = t_1;
	elseif (z <= 1e-33)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (z <= 1.35e+25)
		tmp = t_1;
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	tmp = 0.0;
	if (z <= -35.0)
		tmp = t + x;
	elseif (z <= 3.2e-110)
		tmp = t_1;
	elseif (z <= 1e-33)
		tmp = y * (t / (a - z));
	elseif (z <= 1.35e+25)
		tmp = t_1;
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -35.0], N[(t + x), $MachinePrecision], If[LessEqual[z, 3.2e-110], t$95$1, If[LessEqual[z, 1e-33], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+25], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -35:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 10^{-33}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -35 or 1.35e25 < z

    1. Initial program 75.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.9%

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

    if -35 < z < 3.20000000000000028e-110 or 1.0000000000000001e-33 < z < 1.35e25

    1. Initial program 96.4%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 90.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative91.5%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} + \frac{x}{y}\right)} \]
    9. Taylor expanded in a around inf 75.1%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified74.3%

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

    if 3.20000000000000028e-110 < z < 1.0000000000000001e-33

    1. Initial program 94.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 77.8%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative83.7%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} + \frac{x}{y}\right)} \]
    9. Taylor expanded in y around inf 60.9%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    10. Step-by-step derivation
      1. associate-*l/66.8%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative66.8%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    11. Simplified66.8%

      \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -35:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-110}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 10^{-33}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+25}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+171}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-20}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-69}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+120}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.6e+171)
   (+ t x)
   (if (<= z -3.1e-20)
     (- x (* t (/ y z)))
     (if (<= z 8.8e-69)
       (+ x (* y (/ t a)))
       (if (<= z 2.7e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.6e+171) {
		tmp = t + x;
	} else if (z <= -3.1e-20) {
		tmp = x - (t * (y / z));
	} else if (z <= 8.8e-69) {
		tmp = x + (y * (t / a));
	} else if (z <= 2.7e+120) {
		tmp = x - ((y * t) / z);
	} else {
		tmp = t + 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 (z <= (-3.6d+171)) then
        tmp = t + x
    else if (z <= (-3.1d-20)) then
        tmp = x - (t * (y / z))
    else if (z <= 8.8d-69) then
        tmp = x + (y * (t / a))
    else if (z <= 2.7d+120) then
        tmp = x - ((y * t) / z)
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.6e+171) {
		tmp = t + x;
	} else if (z <= -3.1e-20) {
		tmp = x - (t * (y / z));
	} else if (z <= 8.8e-69) {
		tmp = x + (y * (t / a));
	} else if (z <= 2.7e+120) {
		tmp = x - ((y * t) / z);
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.6e+171:
		tmp = t + x
	elif z <= -3.1e-20:
		tmp = x - (t * (y / z))
	elif z <= 8.8e-69:
		tmp = x + (y * (t / a))
	elif z <= 2.7e+120:
		tmp = x - ((y * t) / z)
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.6e+171)
		tmp = Float64(t + x);
	elseif (z <= -3.1e-20)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 8.8e-69)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 2.7e+120)
		tmp = Float64(x - Float64(Float64(y * t) / z));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.6e+171)
		tmp = t + x;
	elseif (z <= -3.1e-20)
		tmp = x - (t * (y / z));
	elseif (z <= 8.8e-69)
		tmp = x + (y * (t / a));
	elseif (z <= 2.7e+120)
		tmp = x - ((y * t) / z);
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+171], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.1e-20], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-69], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+120], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+171}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-20}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq 8.8 \cdot 10^{-69}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.60000000000000018e171 or 2.7e120 < z

    1. Initial program 63.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.6%

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

    if -3.60000000000000018e171 < z < -3.1e-20

    1. Initial program 88.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 77.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative81.9%

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Simplified81.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*75.4%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified75.4%

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

    if -3.1e-20 < z < 8.8000000000000001e-69

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 90.3%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative92.1%

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

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

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

    if 8.8000000000000001e-69 < z < 2.7e120

    1. Initial program 94.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 76.8%

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg71.7%

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*66.7%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified66.7%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Taylor expanded in t around 0 71.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+171}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-20}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-69}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+120}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+168}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-19}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-68}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+120}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.9e+168)
   (+ t x)
   (if (<= z -5.2e-19)
     (- x (* y (/ t z)))
     (if (<= z 4e-68)
       (+ x (* y (/ t a)))
       (if (<= z 4.5e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e+168) {
		tmp = t + x;
	} else if (z <= -5.2e-19) {
		tmp = x - (y * (t / z));
	} else if (z <= 4e-68) {
		tmp = x + (y * (t / a));
	} else if (z <= 4.5e+120) {
		tmp = x - ((y * t) / z);
	} else {
		tmp = t + 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 (z <= (-2.9d+168)) then
        tmp = t + x
    else if (z <= (-5.2d-19)) then
        tmp = x - (y * (t / z))
    else if (z <= 4d-68) then
        tmp = x + (y * (t / a))
    else if (z <= 4.5d+120) then
        tmp = x - ((y * t) / z)
    else
        tmp = t + x
    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.9e+168) {
		tmp = t + x;
	} else if (z <= -5.2e-19) {
		tmp = x - (y * (t / z));
	} else if (z <= 4e-68) {
		tmp = x + (y * (t / a));
	} else if (z <= 4.5e+120) {
		tmp = x - ((y * t) / z);
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.9e+168:
		tmp = t + x
	elif z <= -5.2e-19:
		tmp = x - (y * (t / z))
	elif z <= 4e-68:
		tmp = x + (y * (t / a))
	elif z <= 4.5e+120:
		tmp = x - ((y * t) / z)
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.9e+168)
		tmp = Float64(t + x);
	elseif (z <= -5.2e-19)
		tmp = Float64(x - Float64(y * Float64(t / z)));
	elseif (z <= 4e-68)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 4.5e+120)
		tmp = Float64(x - Float64(Float64(y * t) / z));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.9e+168)
		tmp = t + x;
	elseif (z <= -5.2e-19)
		tmp = x - (y * (t / z));
	elseif (z <= 4e-68)
		tmp = x + (y * (t / a));
	elseif (z <= 4.5e+120)
		tmp = x - ((y * t) / z);
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -5.2e-19], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+120], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+168}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-19}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9e168 or 4.49999999999999977e120 < z

    1. Initial program 63.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.6%

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

    if -2.9e168 < z < -5.20000000000000026e-19

    1. Initial program 88.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 77.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative81.9%

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Simplified81.9%

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

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/77.5%

        \[\leadsto x + y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-177.5%

        \[\leadsto x + y \cdot \frac{\color{blue}{-t}}{z} \]
    10. Simplified77.5%

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

    if -5.20000000000000026e-19 < z < 4.00000000000000027e-68

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 90.3%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative92.1%

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

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

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

    if 4.00000000000000027e-68 < z < 4.49999999999999977e120

    1. Initial program 94.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 76.8%

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg71.7%

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*66.7%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified66.7%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Taylor expanded in t around 0 71.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+168}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-19}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-68}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+120}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+169}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-19}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+25}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6e+169)
   (+ t x)
   (if (<= z -2.1e-19)
     (- x (* t (/ y z)))
     (if (<= z 3.6e+25) (+ x (* y (/ t a))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6e+169) {
		tmp = t + x;
	} else if (z <= -2.1e-19) {
		tmp = x - (t * (y / z));
	} else if (z <= 3.6e+25) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t + 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 (z <= (-6d+169)) then
        tmp = t + x
    else if (z <= (-2.1d-19)) then
        tmp = x - (t * (y / z))
    else if (z <= 3.6d+25) then
        tmp = x + (y * (t / a))
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6e+169) {
		tmp = t + x;
	} else if (z <= -2.1e-19) {
		tmp = x - (t * (y / z));
	} else if (z <= 3.6e+25) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6e+169:
		tmp = t + x
	elif z <= -2.1e-19:
		tmp = x - (t * (y / z))
	elif z <= 3.6e+25:
		tmp = x + (y * (t / a))
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6e+169)
		tmp = Float64(t + x);
	elseif (z <= -2.1e-19)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 3.6e+25)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6e+169)
		tmp = t + x;
	elseif (z <= -2.1e-19)
		tmp = x - (t * (y / z));
	elseif (z <= 3.6e+25)
		tmp = x + (y * (t / a));
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+169], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.1e-19], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+25], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+169}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-19}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.9999999999999999e169 or 3.60000000000000015e25 < z

    1. Initial program 69.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 78.6%

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

    if -5.9999999999999999e169 < z < -2.0999999999999999e-19

    1. Initial program 88.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 77.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative81.9%

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Simplified81.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*75.4%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified75.4%

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

    if -2.0999999999999999e-19 < z < 3.60000000000000015e25

    1. Initial program 96.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 89.4%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative90.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+169}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-19}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+25}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 84.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+168} \lor \neg \left(z \leq 5.4 \cdot 10^{+121}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.55e+168) (not (<= z 5.4e+121)))
   (+ t x)
   (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.55e+168) || !(z <= 5.4e+121)) {
		tmp = t + x;
	} else {
		tmp = x + (y * (t / (a - 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 <= (-1.55d+168)) .or. (.not. (z <= 5.4d+121))) then
        tmp = t + x
    else
        tmp = x + (y * (t / (a - 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 <= -1.55e+168) || !(z <= 5.4e+121)) {
		tmp = t + x;
	} else {
		tmp = x + (y * (t / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.55e+168) or not (z <= 5.4e+121):
		tmp = t + x
	else:
		tmp = x + (y * (t / (a - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.55e+168) || !(z <= 5.4e+121))
		tmp = Float64(t + x);
	else
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.55e+168) || ~((z <= 5.4e+121)))
		tmp = t + x;
	else
		tmp = x + (y * (t / (a - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+168], N[Not[LessEqual[z, 5.4e+121]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+168} \lor \neg \left(z \leq 5.4 \cdot 10^{+121}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999998e168 or 5.4000000000000004e121 < z

    1. Initial program 63.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.6%

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

    if -1.54999999999999998e168 < z < 5.4000000000000004e121

    1. Initial program 94.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 84.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+168} \lor \neg \left(z \leq 5.4 \cdot 10^{+121}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 87.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -54 \lor \neg \left(z \leq 2.9 \cdot 10^{+21}\right):\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -54.0) (not (<= z 2.9e+21)))
   (+ x (- t (* t (/ y z))))
   (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -54.0) || !(z <= 2.9e+21)) {
		tmp = x + (t - (t * (y / z)));
	} else {
		tmp = x + (y * (t / (a - 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 <= (-54.0d0)) .or. (.not. (z <= 2.9d+21))) then
        tmp = x + (t - (t * (y / z)))
    else
        tmp = x + (y * (t / (a - 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 <= -54.0) || !(z <= 2.9e+21)) {
		tmp = x + (t - (t * (y / z)));
	} else {
		tmp = x + (y * (t / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -54.0) or not (z <= 2.9e+21):
		tmp = x + (t - (t * (y / z)))
	else:
		tmp = x + (y * (t / (a - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -54.0) || !(z <= 2.9e+21))
		tmp = Float64(x + Float64(t - Float64(t * Float64(y / z))));
	else
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -54.0) || ~((z <= 2.9e+21)))
		tmp = x + (t - (t * (y / z)));
	else
		tmp = x + (y * (t / (a - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -54.0], N[Not[LessEqual[z, 2.9e+21]], $MachinePrecision]], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -54 \lor \neg \left(z \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -54 or 2.9e21 < z

    1. Initial program 74.8%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 87.0%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-165.7%

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{-t}{z}} \]
    8. Taylor expanded in y around 0 81.0%

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

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

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

        \[\leadsto x + \left(t + \color{blue}{\left(-\frac{t}{\frac{z}{y}}\right)}\right) \]
      4. unsub-neg90.8%

        \[\leadsto x + \color{blue}{\left(t - \frac{t}{\frac{z}{y}}\right)} \]
      5. associate-/r/90.0%

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

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

        \[\leadsto x + \left(t - \color{blue}{t \cdot \frac{y}{z}}\right) \]
    10. Simplified90.8%

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

    if -54 < z < 2.9e21

    1. Initial program 96.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 89.5%

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

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

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

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

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

Alternative 11: 87.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -205:\\ \;\;\;\;x + t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -205.0)
   (+ x (* t (/ (- z y) z)))
   (if (<= z 2.6e+21) (+ x (* y (/ t (- a z)))) (+ x (- t (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -205.0) {
		tmp = x + (t * ((z - y) / z));
	} else if (z <= 2.6e+21) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (t - (t * (y / 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 <= (-205.0d0)) then
        tmp = x + (t * ((z - y) / z))
    else if (z <= 2.6d+21) then
        tmp = x + (y * (t / (a - z)))
    else
        tmp = x + (t - (t * (y / 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 <= -205.0) {
		tmp = x + (t * ((z - y) / z));
	} else if (z <= 2.6e+21) {
		tmp = x + (y * (t / (a - z)));
	} else {
		tmp = x + (t - (t * (y / z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -205.0:
		tmp = x + (t * ((z - y) / z))
	elif z <= 2.6e+21:
		tmp = x + (y * (t / (a - z)))
	else:
		tmp = x + (t - (t * (y / z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -205.0)
		tmp = Float64(x + Float64(t * Float64(Float64(z - y) / z)));
	elseif (z <= 2.6e+21)
		tmp = Float64(x + Float64(y * Float64(t / Float64(a - z))));
	else
		tmp = Float64(x + Float64(t - Float64(t * Float64(y / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -205.0)
		tmp = x + (t * ((z - y) / z));
	elseif (z <= 2.6e+21)
		tmp = x + (y * (t / (a - z)));
	else
		tmp = x + (t - (t * (y / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -205.0], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+21], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -205:\\
\;\;\;\;x + t \cdot \frac{z - y}{z}\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\


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

    1. Initial program 76.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 71.5%

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

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

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

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

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

    if -205 < z < 2.6e21

    1. Initial program 96.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 89.5%

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

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

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

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

    if 2.6e21 < z

    1. Initial program 72.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 86.7%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-162.6%

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

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{-t}{z}} \]
    8. Taylor expanded in y around 0 80.2%

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

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

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

        \[\leadsto x + \left(t + \color{blue}{\left(-\frac{t}{\frac{z}{y}}\right)}\right) \]
      4. unsub-neg89.9%

        \[\leadsto x + \color{blue}{\left(t - \frac{t}{\frac{z}{y}}\right)} \]
      5. associate-/r/88.3%

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

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

        \[\leadsto x + \left(t - \color{blue}{t \cdot \frac{y}{z}}\right) \]
    10. Simplified89.9%

      \[\leadsto x + \color{blue}{\left(t - t \cdot \frac{y}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -205:\\ \;\;\;\;x + t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 76.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -215 \lor \neg \left(z \leq 2.9 \cdot 10^{+25}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -215.0) (not (<= z 2.9e+25))) (+ t x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -215.0) || !(z <= 2.9e+25)) {
		tmp = t + 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 <= (-215.0d0)) .or. (.not. (z <= 2.9d+25))) then
        tmp = t + 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 <= -215.0) || !(z <= 2.9e+25)) {
		tmp = t + x;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -215.0) or not (z <= 2.9e+25):
		tmp = t + x
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -215.0) || !(z <= 2.9e+25))
		tmp = Float64(t + 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 <= -215.0) || ~((z <= 2.9e+25)))
		tmp = t + x;
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -215.0], N[Not[LessEqual[z, 2.9e+25]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -215 \lor \neg \left(z \leq 2.9 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -215 or 2.8999999999999999e25 < z

    1. Initial program 75.0%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.9%

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

    if -215 < z < 2.8999999999999999e25

    1. Initial program 96.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 89.0%

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

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

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

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

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

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

Alternative 13: 60.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 10^{+229}:\\
\;\;\;\;t + x\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.89999999999999998e201

    1. Initial program 82.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 76.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*55.5%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified55.5%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Taylor expanded in x around 0 53.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*l/50.0%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{z} \cdot y\right)} \]
      2. associate-/r/45.5%

        \[\leadsto -1 \cdot \color{blue}{\frac{t}{\frac{z}{y}}} \]
      3. associate-*r/45.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{\frac{z}{y}}} \]
      4. neg-mul-145.5%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{z}{y}} \]
    13. Simplified45.5%

      \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y}}} \]
    14. Step-by-step derivation
      1. distribute-frac-neg45.5%

        \[\leadsto \color{blue}{-\frac{t}{\frac{z}{y}}} \]
      2. associate-/r/50.0%

        \[\leadsto -\color{blue}{\frac{t}{z} \cdot y} \]
      3. distribute-rgt-neg-in50.0%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \left(-y\right)} \]
    15. Applied egg-rr50.0%

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

    if -1.89999999999999998e201 < y < 9.9999999999999999e228

    1. Initial program 86.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 63.4%

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

    if 9.9999999999999999e228 < y

    1. Initial program 74.4%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 74.4%

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg51.0%

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*60.1%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified60.1%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Taylor expanded in x around 0 42.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*l/46.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{z} \cdot y\right)} \]
      2. associate-/r/46.8%

        \[\leadsto -1 \cdot \color{blue}{\frac{t}{\frac{z}{y}}} \]
      3. associate-*r/46.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{\frac{z}{y}}} \]
      4. neg-mul-146.8%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{z}{y}} \]
    13. Simplified46.8%

      \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y}}} \]
    14. Taylor expanded in t around 0 42.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    15. Step-by-step derivation
      1. associate-*r/47.0%

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

        \[\leadsto \color{blue}{-t \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in47.0%

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

        \[\leadsto t \cdot \color{blue}{\frac{-y}{z}} \]
    16. Simplified47.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+201}:\\ \;\;\;\;y \cdot \frac{t}{-z}\\ \mathbf{elif}\;y \leq 10^{+229}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 62.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -29.5 \lor \neg \left(z \leq 1.45 \cdot 10^{-72}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -29.5) (not (<= z 1.45e-72))) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -29.5) || !(z <= 1.45e-72)) {
		tmp = t + 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 ((z <= (-29.5d0)) .or. (.not. (z <= 1.45d-72))) then
        tmp = t + 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 ((z <= -29.5) || !(z <= 1.45e-72)) {
		tmp = t + x;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -29.5) or not (z <= 1.45e-72):
		tmp = t + x
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -29.5) || !(z <= 1.45e-72))
		tmp = Float64(t + x);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -29.5) || ~((z <= 1.45e-72)))
		tmp = t + x;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -29.5], N[Not[LessEqual[z, 1.45e-72]], $MachinePrecision]], N[(t + x), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -29.5 \lor \neg \left(z \leq 1.45 \cdot 10^{-72}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -29.5 or 1.44999999999999999e-72 < z

    1. Initial program 77.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 69.7%

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

    if -29.5 < z < 1.44999999999999999e-72

    1. Initial program 96.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 48.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -29.5 \lor \neg \left(z \leq 1.45 \cdot 10^{-72}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 60.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+229}:\\
\;\;\;\;t + x\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.2e229

    1. Initial program 86.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.6%

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

    if 1.2e229 < y

    1. Initial program 74.4%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 74.4%

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg51.0%

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*60.1%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified60.1%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Taylor expanded in x around 0 42.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*l/46.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{z} \cdot y\right)} \]
      2. associate-/r/46.8%

        \[\leadsto -1 \cdot \color{blue}{\frac{t}{\frac{z}{y}}} \]
      3. associate-*r/46.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{\frac{z}{y}}} \]
      4. neg-mul-146.8%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{z}{y}} \]
    13. Simplified46.8%

      \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y}}} \]
    14. Taylor expanded in t around 0 42.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    15. Step-by-step derivation
      1. associate-*r/47.0%

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

        \[\leadsto \color{blue}{-t \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in47.0%

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

        \[\leadsto t \cdot \color{blue}{\frac{-y}{z}} \]
    16. Simplified47.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{+229}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 95.7% accurate, 1.0× speedup?

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

\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Derivation
  1. Initial program 85.1%

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

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

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
  4. Add Preprocessing
  5. Final simplification96.0%

    \[\leadsto x + \left(y - z\right) \cdot \frac{t}{a - z} \]
  6. Add Preprocessing

Alternative 17: 50.1% 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 85.1%

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

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

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 47.9%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification47.9%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{a - z} \cdot t\\ \mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
   (if (< t -1.0682974490174067e-39)
     t_1
     (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) / (a - z)) * t);
	double tmp;
	if (t < -1.0682974490174067e-39) {
		tmp = t_1;
	} else if (t < 3.9110949887586375e-141) {
		tmp = x + (((y - z) * t) / (a - z));
	} 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 = x + (((y - z) / (a - z)) * t)
    if (t < (-1.0682974490174067d-39)) then
        tmp = t_1
    else if (t < 3.9110949887586375d-141) then
        tmp = x + (((y - z) * t) / (a - z))
    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 = x + (((y - z) / (a - z)) * t);
	double tmp;
	if (t < -1.0682974490174067e-39) {
		tmp = t_1;
	} else if (t < 3.9110949887586375e-141) {
		tmp = x + (((y - z) * t) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) / (a - z)) * t)
	tmp = 0
	if t < -1.0682974490174067e-39:
		tmp = t_1
	elif t < 3.9110949887586375e-141:
		tmp = x + (((y - z) * t) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t))
	tmp = 0.0
	if (t < -1.0682974490174067e-39)
		tmp = t_1;
	elseif (t < 3.9110949887586375e-141)
		tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - z) / (a - z)) * t);
	tmp = 0.0;
	if (t < -1.0682974490174067e-39)
		tmp = t_1;
	elseif (t < 3.9110949887586375e-141)
		tmp = x + (((y - z) * t) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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