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

Percentage Accurate: 85.7% → 99.7%
Time: 9.2s
Alternatives: 16
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 16 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 0.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 4 \cdot 10^{+300}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + x\\ \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 4e+300)))
     (+ x (/ (- y z) (/ (- a z) t)))
     (+ t_1 x))))
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 <= 4e+300)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 4e+300)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = t_1 + x;
	}
	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 <= 4e+300):
		tmp = x + ((y - z) / ((a - z) / t))
	else:
		tmp = t_1 + x
	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 <= 4e+300))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	else
		tmp = Float64(t_1 + x);
	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 <= 4e+300)))
		tmp = x + ((y - z) / ((a - z) / t));
	else
		tmp = t_1 + x;
	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, 4e+300]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $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 4 \cdot 10^{+300}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


\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 4.0000000000000002e300 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 49.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
    5. Step-by-step derivation
      1. clear-num99.8%

        \[\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)) < 4.0000000000000002e300

    1. Initial program 99.9%

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

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

Alternative 2: 99.5% 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 4 \cdot 10^{+266}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + x\\ \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 4e+266)))
     (+ x (* (- y z) (/ t (- a z))))
     (+ t_1 x))))
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 <= 4e+266)) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 4e+266)) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else {
		tmp = t_1 + x;
	}
	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 <= 4e+266):
		tmp = x + ((y - z) * (t / (a - z)))
	else:
		tmp = t_1 + x
	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 <= 4e+266))
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z))));
	else
		tmp = Float64(t_1 + x);
	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 <= 4e+266)))
		tmp = x + ((y - z) * (t / (a - z)));
	else
		tmp = t_1 + x;
	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, 4e+266]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $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 4 \cdot 10^{+266}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\

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


\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 4.0000000000000001e266 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 49.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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.0000000000000001e266

    1. Initial program 99.9%

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

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

Alternative 3: 76.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00054:\\
\;\;\;\;t + x\\

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.40000000000000007e-4 or 1.75000000000000003e-22 < z

    1. Initial program 77.5%

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

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

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

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

    if -5.40000000000000007e-4 < z < -1.70000000000000008e-104

    1. Initial program 99.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
    5. Taylor expanded in z around 0 78.3%

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

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

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

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

    if -1.70000000000000008e-104 < z < -1.9999999999999999e-112

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. *-commutative76.1%

        \[\leadsto -\color{blue}{\frac{y - z}{z} \cdot t} \]
      4. div-sub76.1%

        \[\leadsto -\color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \cdot t \]
      5. sub-neg76.1%

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

        \[\leadsto -\left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \cdot t \]
      7. metadata-eval76.1%

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      11. distribute-neg-in76.1%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      12. metadata-eval76.1%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      13. sub-neg76.1%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    10. Simplified76.1%

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

    if -1.9999999999999999e-112 < z < 1.75000000000000003e-22

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00054:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-104}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-22}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.046:\\
\;\;\;\;t + x\\

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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

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


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

    1. Initial program 77.5%

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

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

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

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

    if -0.045999999999999999 < z < -1.70000000000000008e-104

    1. Initial program 99.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
    5. Taylor expanded in z around 0 78.3%

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

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

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

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

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

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

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

    if -1.70000000000000008e-104 < z < -1.9999999999999999e-112

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. *-commutative76.1%

        \[\leadsto -\color{blue}{\frac{y - z}{z} \cdot t} \]
      4. div-sub76.1%

        \[\leadsto -\color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \cdot t \]
      5. sub-neg76.1%

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

        \[\leadsto -\left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \cdot t \]
      7. metadata-eval76.1%

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      11. distribute-neg-in76.1%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      12. metadata-eval76.1%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      13. sub-neg76.1%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    10. Simplified76.1%

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

    if -1.9999999999999999e-112 < z < 1.75000000000000002e-20

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.046:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-104}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-20}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.37:\\
\;\;\;\;t + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.37 or 6.9999999999999999e121 < z

    1. Initial program 73.9%

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

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

    if -0.37 < z < 2.9000000000000001e-91

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

    if 2.9000000000000001e-91 < z < 6.9999999999999999e121

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.37:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-91}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+121}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00061:\\
\;\;\;\;t + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.09999999999999974e-4 or 1.06e123 < z

    1. Initial program 73.9%

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

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

    if -6.09999999999999974e-4 < z < 3.6e-91

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

    if 3.6e-91 < z < 1.06e123

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+172} \lor \neg \left(z \leq 6.4 \cdot 10^{+122}\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.7e+172) (not (<= z 6.4e+122)))
   (+ t x)
   (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.7e+172) || !(z <= 6.4e+122)) {
		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.7d+172)) .or. (.not. (z <= 6.4d+122))) 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.7e+172) || !(z <= 6.4e+122)) {
		tmp = t + x;
	} else {
		tmp = x + (t * (y / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.7e+172) or not (z <= 6.4e+122):
		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.7e+172) || !(z <= 6.4e+122))
		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.7e+172) || ~((z <= 6.4e+122)))
		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.7e+172], N[Not[LessEqual[z, 6.4e+122]], $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.7 \cdot 10^{+172} \lor \neg \left(z \leq 6.4 \cdot 10^{+122}\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.6999999999999999e172 or 6.40000000000000024e122 < z

    1. Initial program 69.6%

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

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

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

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

    if -1.6999999999999999e172 < z < 6.40000000000000024e122

    1. Initial program 94.1%

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

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

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

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

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

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

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

Alternative 8: 84.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+173} \lor \neg \left(z \leq 1.6 \cdot 10^{+123}\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 -8e+173) (not (<= z 1.6e+123)))
   (+ t x)
   (+ x (/ t (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -8e+173) || !(z <= 1.6e+123)) {
		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 <= (-8d+173)) .or. (.not. (z <= 1.6d+123))) 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 <= -8e+173) || !(z <= 1.6e+123)) {
		tmp = t + x;
	} else {
		tmp = x + (t / ((a - z) / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -8e+173) or not (z <= 1.6e+123):
		tmp = t + x
	else:
		tmp = x + (t / ((a - z) / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -8e+173) || !(z <= 1.6e+123))
		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 <= -8e+173) || ~((z <= 1.6e+123)))
		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, -8e+173], N[Not[LessEqual[z, 1.6e+123]], $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 -8 \cdot 10^{+173} \lor \neg \left(z \leq 1.6 \cdot 10^{+123}\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 < -8.0000000000000001e173 or 1.60000000000000002e123 < z

    1. Initial program 69.6%

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

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

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

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

    if -8.0000000000000001e173 < z < 1.60000000000000002e123

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 86.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 91.7%

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

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

    if -2.0500000000000001e91 < y < 1.6500000000000001e35

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

    if 1.6500000000000001e35 < y

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.7% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 77.5%

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

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

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

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

    if -4.40000000000000016e-4 < z < 1.19999999999999996e-20

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

Alternative 11: 59.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+211}:\\
\;\;\;\;t + x\\

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


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

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      2. clear-num53.8%

        \[\leadsto -t \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      3. div-inv53.9%

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

        \[\leadsto -\color{blue}{\frac{t}{z} \cdot y} \]
    12. Applied egg-rr58.7%

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

    if -1.55e139 < y < 4.2e211

    1. Initial program 86.2%

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

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

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

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

    if 4.2e211 < y

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. *-commutative71.5%

        \[\leadsto -\color{blue}{\frac{y - z}{z} \cdot t} \]
      4. div-sub71.5%

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

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

        \[\leadsto -\left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \cdot t \]
      7. metadata-eval71.5%

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

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

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} + -1\right)\right)} \]
      10. +-commutative71.5%

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      11. distribute-neg-in71.5%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      12. metadata-eval71.5%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      13. sub-neg71.5%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    10. Simplified71.5%

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

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

Alternative 12: 59.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+139} \lor \neg \left(y \leq 2.6 \cdot 10^{+213}\right):\\
\;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.2200000000000001e139 or 2.59999999999999999e213 < y

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      2. clear-num58.6%

        \[\leadsto -t \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      3. div-inv58.8%

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

        \[\leadsto -\color{blue}{\frac{t}{z} \cdot y} \]
    12. Applied egg-rr58.5%

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

    if -1.2200000000000001e139 < y < 2.59999999999999999e213

    1. Initial program 86.2%

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

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

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

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

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

Alternative 13: 59.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.1 \cdot 10^{+137}:\\
\;\;\;\;y \cdot \left(-\frac{t}{z}\right)\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+211}:\\
\;\;\;\;t + x\\

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


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

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      2. clear-num53.8%

        \[\leadsto -t \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      3. div-inv53.9%

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

        \[\leadsto -\color{blue}{\frac{t}{z} \cdot y} \]
    12. Applied egg-rr58.7%

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

    if -7.10000000000000007e137 < y < 1.2999999999999999e211

    1. Initial program 86.2%

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

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

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

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

    if 1.2999999999999999e211 < y

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 96.1% 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.6%

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

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

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

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

Alternative 15: 62.0% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.96e173

    1. Initial program 80.0%

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

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

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

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

    if -1.96e173 < a

    1. Initial program 87.3%

      \[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 z around inf 65.2%

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

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

Alternative 16: 51.0% accurate, 11.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification48.3%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024095 
(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))))