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

Percentage Accurate: 85.1% → 97.4%
Time: 10.8s
Alternatives: 14
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 14 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.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: 97.4% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt[3]{a - z}\\ x + \frac{y - z}{{t\_1}^{2}} \cdot \frac{t}{t\_1} \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (cbrt (- a z)))) (+ x (* (/ (- y z) (pow t_1 2.0)) (/ t t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = cbrt((a - z));
	return x + (((y - z) / pow(t_1, 2.0)) * (t / t_1));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = Math.cbrt((a - z));
	return x + (((y - z) / Math.pow(t_1, 2.0)) * (t / t_1));
}
function code(x, y, z, t, a)
	t_1 = cbrt(Float64(a - z))
	return Float64(x + Float64(Float64(Float64(y - z) / (t_1 ^ 2.0)) * Float64(t / t_1)))
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Power[N[(a - z), $MachinePrecision], 1/3], $MachinePrecision]}, N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt[3]{a - z}\\
x + \frac{y - z}{{t\_1}^{2}} \cdot \frac{t}{t\_1}
\end{array}
\end{array}
Derivation
  1. Initial program 86.3%

    \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt86.0%

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

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

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}} \cdot \frac{t}{\sqrt[3]{a - z}} \]
  4. Applied egg-rr98.6%

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

Alternative 2: 86.9% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 77.6%

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

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

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

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

    if -1.10000000000000008e56 < y < 6.6000000000000003e-71

    1. Initial program 88.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt87.7%

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}} \cdot \frac{t}{\sqrt[3]{a - z}} \]
    4. Applied egg-rr99.3%

      \[\leadsto x + \color{blue}{\frac{y - z}{{\left(\sqrt[3]{a - z}\right)}^{2}} \cdot \frac{t}{\sqrt[3]{a - z}}} \]
    5. Step-by-step derivation
      1. clear-num99.4%

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
      3. *-un-lft-identity98.6%

        \[\leadsto x + \frac{\color{blue}{t}}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}} \]
    6. Applied egg-rr98.6%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
    7. Step-by-step derivation
      1. associate-*l/98.6%

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

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

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

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

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

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

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

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

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

    if 6.6000000000000003e-71 < y

    1. Initial program 89.3%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.7%

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

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(\frac{1}{a - z} \cdot t\right)} \]
    6. Applied egg-rr98.7%

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

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

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

Alternative 3: 84.9% accurate, 0.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + z \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9e-110 or 1.0500000000000001e-70 < y

    1. Initial program 85.6%

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

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

    if -3.9e-110 < y < 1.0500000000000001e-70

    1. Initial program 87.6%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out84.4%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(-z\right)} \]
      5. *-commutative94.6%

        \[\leadsto x + \color{blue}{\left(-z\right) \cdot \frac{t}{a - z}} \]
      6. distribute-lft-neg-out94.6%

        \[\leadsto x + \color{blue}{\left(-z \cdot \frac{t}{a - z}\right)} \]
      7. distribute-rgt-neg-in94.6%

        \[\leadsto x + \color{blue}{z \cdot \left(-\frac{t}{a - z}\right)} \]
      8. distribute-frac-neg294.6%

        \[\leadsto x + z \cdot \color{blue}{\frac{t}{-\left(a - z\right)}} \]
      9. neg-sub094.6%

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

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(a + \left(-z\right)\right)}} \]
      11. +-commutative94.6%

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      12. associate--r+94.6%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(0 - \left(-z\right)\right) - a}} \]
      13. neg-sub094.6%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      14. remove-double-neg94.6%

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

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

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

Alternative 4: 86.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 77.6%

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

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

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

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

    if -3.49999999999999999e56 < y < 5.1999999999999996e-68

    1. Initial program 88.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt87.7%

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}} \cdot \frac{t}{\sqrt[3]{a - z}} \]
    4. Applied egg-rr99.3%

      \[\leadsto x + \color{blue}{\frac{y - z}{{\left(\sqrt[3]{a - z}\right)}^{2}} \cdot \frac{t}{\sqrt[3]{a - z}}} \]
    5. Step-by-step derivation
      1. clear-num99.4%

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
      3. *-un-lft-identity98.6%

        \[\leadsto x + \frac{\color{blue}{t}}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}} \]
    6. Applied egg-rr98.6%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
    7. Step-by-step derivation
      1. associate-*l/98.6%

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

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

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

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

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

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

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

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

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

    if 5.1999999999999996e-68 < y

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

Alternative 5: 84.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{z - a}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-110}:\\
\;\;\;\;x - y \cdot t\_1\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{-68}:\\
\;\;\;\;x + z \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.70000000000000016e-110

    1. Initial program 82.3%

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

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

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

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

    if -3.70000000000000016e-110 < y < 3.60000000000000007e-68

    1. Initial program 87.6%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out84.4%

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

        \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(-z\right)} \]
      5. *-commutative94.6%

        \[\leadsto x + \color{blue}{\left(-z\right) \cdot \frac{t}{a - z}} \]
      6. distribute-lft-neg-out94.6%

        \[\leadsto x + \color{blue}{\left(-z \cdot \frac{t}{a - z}\right)} \]
      7. distribute-rgt-neg-in94.6%

        \[\leadsto x + \color{blue}{z \cdot \left(-\frac{t}{a - z}\right)} \]
      8. distribute-frac-neg294.6%

        \[\leadsto x + z \cdot \color{blue}{\frac{t}{-\left(a - z\right)}} \]
      9. neg-sub094.6%

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

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(a + \left(-z\right)\right)}} \]
      11. +-commutative94.6%

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      12. associate--r+94.6%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(0 - \left(-z\right)\right) - a}} \]
      13. neg-sub094.6%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      14. remove-double-neg94.6%

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

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

    if 3.60000000000000007e-68 < y

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

Alternative 6: 76.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999998e-20 or 1.2999999999999999e-16 < z

    1. Initial program 77.6%

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

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

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

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

    if -3.7999999999999998e-20 < z < 1.2999999999999999e-16

    1. Initial program 95.4%

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

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

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

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

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

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

Alternative 7: 76.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999986e-20 or 2.6000000000000001e-11 < z

    1. Initial program 77.6%

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

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

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

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

    if -4.79999999999999986e-20 < z < 2.6000000000000001e-11

    1. Initial program 95.4%

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

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

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

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

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

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

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

Alternative 8: 72.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 73.0%

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

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

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

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

    if -4.9000000000000002e-20 < z < 1.86000000000000004e-59

    1. Initial program 95.7%

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

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

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

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

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

    if 1.86000000000000004e-59 < z

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{z} \cdot y} \]
      2. add-sqr-sqrt34.4%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z} \cdot y \]
      3. sqrt-unprod60.5%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z} \cdot y \]
      4. sqr-neg60.5%

        \[\leadsto x + \frac{\sqrt{\color{blue}{t \cdot t}}}{z} \cdot y \]
      5. sqrt-unprod31.1%

        \[\leadsto x + \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z} \cdot y \]
      6. add-sqr-sqrt58.5%

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

        \[\leadsto \color{blue}{x - \left(-\frac{t}{z}\right) \cdot y} \]
      8. distribute-frac-neg58.5%

        \[\leadsto x - \color{blue}{\frac{-t}{z}} \cdot y \]
      9. *-commutative58.5%

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

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z} \]
      11. sqrt-unprod65.5%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z} \]
      12. sqr-neg65.5%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z} \]
      13. sqrt-unprod40.7%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z} \]
      14. add-sqr-sqrt75.0%

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

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

Alternative 9: 79.8% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 61.1%

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

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

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

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

    if -1.45000000000000001e58 < z

    1. Initial program 91.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4999999999999999e-20 or 36 < z

    1. Initial program 77.1%

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

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

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

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

    if -2.4999999999999999e-20 < z < 36

    1. Initial program 95.5%

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

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

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

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

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

Alternative 11: 52.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-262}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-94}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -3.3e-262) x (if (<= x 2.7e-94) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -3.3e-262) {
		tmp = x;
	} else if (x <= 2.7e-94) {
		tmp = t;
	} 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 (x <= (-3.3d-262)) then
        tmp = x
    else if (x <= 2.7d-94) then
        tmp = t
    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 (x <= -3.3e-262) {
		tmp = x;
	} else if (x <= 2.7e-94) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -3.3e-262:
		tmp = x
	elif x <= 2.7e-94:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -3.3e-262)
		tmp = x;
	elseif (x <= 2.7e-94)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -3.3e-262)
		tmp = x;
	elseif (x <= 2.7e-94)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.3e-262], x, If[LessEqual[x, 2.7e-94], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-262}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.7 \cdot 10^{-94}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3000000000000003e-262 or 2.7000000000000001e-94 < x

    1. Initial program 87.2%

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

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

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

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

    if -3.3000000000000003e-262 < x < 2.7000000000000001e-94

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
    9. Taylor expanded in y around 0 33.9%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 98.3% accurate, 1.0× speedup?

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

\\
x + \frac{t}{\frac{a - z}{y - z}}
\end{array}
Derivation
  1. Initial program 86.3%

    \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt86.0%

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

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

      \[\leadsto x + \frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}} \cdot \frac{t}{\sqrt[3]{a - z}} \]
  4. Applied egg-rr98.6%

    \[\leadsto x + \color{blue}{\frac{y - z}{{\left(\sqrt[3]{a - z}\right)}^{2}} \cdot \frac{t}{\sqrt[3]{a - z}}} \]
  5. Step-by-step derivation
    1. clear-num98.6%

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

      \[\leadsto x + \color{blue}{\frac{1 \cdot t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
    3. *-un-lft-identity97.7%

      \[\leadsto x + \frac{\color{blue}{t}}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}} \]
  6. Applied egg-rr97.7%

    \[\leadsto x + \color{blue}{\frac{t}{\frac{{\left(\sqrt[3]{a - z}\right)}^{2}}{y - z} \cdot \sqrt[3]{a - z}}} \]
  7. Step-by-step derivation
    1. associate-*l/97.7%

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

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

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

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

Alternative 13: 95.6% 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 86.3%

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

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

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

Alternative 14: 19.0% accurate, 11.0× speedup?

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

\\
t
\end{array}
Derivation
  1. Initial program 86.3%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  9. Taylor expanded in y around 0 14.7%

    \[\leadsto \color{blue}{t} \]
  10. Add Preprocessing

Developer Target 1: 99.1% 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 2024170 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))

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