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

Percentage Accurate: 85.6% → 99.4%
Time: 9.9s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 85.6% 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.4% 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:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+252}:\\ \;\;\;\;x - \frac{t \cdot \left(z - y\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- y z) t) (- a z))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (- y z) (/ (- a z) t)))
     (if (<= t_1 2e+252)
       (- x (/ (* t (- z y)) (- a z)))
       (+ x (* (- y z) (/ t (- 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)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (t_1 <= 2e+252) {
		tmp = x - ((t * (z - y)) / (a - z));
	} else {
		tmp = x + ((y - z) * (t / (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) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (t_1 <= 2e+252) {
		tmp = x - ((t * (z - y)) / (a - z));
	} else {
		tmp = x + ((y - z) * (t / (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:
		tmp = x + ((y - z) / ((a - z) / t))
	elif t_1 <= 2e+252:
		tmp = x - ((t * (z - y)) / (a - z))
	else:
		tmp = x + ((y - z) * (t / (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))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	elseif (t_1 <= 2e+252)
		tmp = Float64(x - Float64(Float64(t * Float64(z - y)) / Float64(a - z)));
	else
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / 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)
		tmp = x + ((y - z) / ((a - z) / t));
	elseif (t_1 <= 2e+252)
		tmp = x - ((t * (z - y)) / (a - z));
	else
		tmp = x + ((y - z) * (t / (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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+252], N[(x - N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $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:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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

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


\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 44.5%

      \[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. Step-by-step derivation
      1. clear-num99.6%

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

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

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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.0000000000000002e252

    1. Initial program 99.8%

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

    if 2.0000000000000002e252 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 43.9%

      \[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
  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:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq 2 \cdot 10^{+252}:\\ \;\;\;\;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.4% 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 2 \cdot 10^{+252}\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 2e+252)))
     (+ 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 <= 2e+252)) {
		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 <= 2e+252)) {
		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 <= 2e+252):
		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 <= 2e+252))
		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 <= 2e+252)))
		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, 2e+252]], $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 2 \cdot 10^{+252}\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 2.0000000000000002e252 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 44.2%

      \[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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.0000000000000002e252

    1. Initial program 99.8%

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

    \[\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 2 \cdot 10^{+252}\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: 75.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.25999999999999992e110 or 2.09999999999999979e31 < z

    1. Initial program 70.3%

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

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

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

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

    if -1.25999999999999992e110 < z < -1.2e-95

    1. Initial program 98.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 y around inf 92.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. clear-num82.2%

        \[\leadsto x - t \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv82.2%

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    12. Applied egg-rr82.2%

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

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

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

    if -1.2e-95 < z < 2.09999999999999979e31

    1. Initial program 97.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+110}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-95}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1e109 or 1.6999999999999999e31 < z

    1. Initial program 70.3%

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

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

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

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

    if -1.1e109 < z < -4.5000000000000002e-93

    1. Initial program 98.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 y around inf 92.5%

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

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

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

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

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

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

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

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

    if -4.5000000000000002e-93 < z < 1.6999999999999999e31

    1. Initial program 97.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+109}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-93}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+109} \lor \neg \left(z \leq 1.1 \cdot 10^{+54}\right):\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.01999999999999994e109 or 1.09999999999999995e54 < z

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

    if -1.01999999999999994e109 < z < 1.09999999999999995e54

    1. Initial program 97.6%

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

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

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

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

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

Alternative 6: 87.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.0000000000000002e75 or 1.02e54 < z

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e75 < z < 1.02e54

    1. Initial program 97.5%

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

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

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

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

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

Alternative 7: 82.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+109} \lor \neg \left(z \leq 2.6 \cdot 10^{+154}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0500000000000001e109 or 2.59999999999999989e154 < z

    1. Initial program 66.6%

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

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

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

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

    if -1.0500000000000001e109 < z < 2.59999999999999989e154

    1. Initial program 96.2%

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

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

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

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

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

Alternative 8: 84.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+109} \lor \neg \left(z \leq 1.3 \cdot 10^{+152}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15000000000000005e109 or 1.3e152 < z

    1. Initial program 66.6%

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

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

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

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

    if -1.15000000000000005e109 < z < 1.3e152

    1. Initial program 96.2%

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

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

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

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

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

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

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      2. un-div-inv88.6%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    9. Applied egg-rr88.6%

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

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

Alternative 9: 84.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+109} \lor \neg \left(z \leq 5 \cdot 10^{+154}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.01999999999999994e109 or 5.00000000000000004e154 < z

    1. Initial program 66.6%

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

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

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

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

    if -1.01999999999999994e109 < z < 5.00000000000000004e154

    1. Initial program 96.2%

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

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

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

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

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

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

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

Alternative 10: 76.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{-5} \lor \neg \left(z \leq 1.8 \cdot 10^{+31}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6500000000000001e-5 or 1.79999999999999998e31 < z

    1. Initial program 76.4%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    3. Simplified91.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.6500000000000001e-5 < z < 1.79999999999999998e31

    1. Initial program 97.1%

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

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

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

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

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

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

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

Alternative 11: 77.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4500000000000001e-6 or 1.6e31 < z

    1. Initial program 76.4%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    3. Simplified91.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.4500000000000001e-6 < z < 1.6e31

    1. Initial program 97.1%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    9. Applied egg-rr88.2%

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

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

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

Alternative 12: 77.3% accurate, 0.6× speedup?

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

    1. Initial program 76.4%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    3. Simplified91.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.45e-5 < z < 1.6e31

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

Alternative 13: 64.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-47} \lor \neg \left(z \leq 3.2 \cdot 10^{-78}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.90000000000000007e-47 or 3.2e-78 < z

    1. Initial program 79.5%

      \[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 80.2%

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

    if -1.90000000000000007e-47 < z < 3.2e-78

    1. Initial program 98.1%

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

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

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

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

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

Alternative 14: 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 87.7%

    \[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. Add Preprocessing

Alternative 15: 50.4% 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 87.7%

    \[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 x around inf 53.9%

    \[\leadsto \color{blue}{x} \]
  6. 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 2024087 
(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))))