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

Percentage Accurate: 77.3% → 93.7%
Time: 12.7s
Alternatives: 15
Speedup: 1.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 77.3% accurate, 1.0× speedup?

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

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

Alternative 1: 93.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{a - t}\\ x + y \cdot \left(\frac{-1 - {t_1}^{3}}{-1 + \left(t_1 - t_1 \cdot t_1\right)} - \frac{z}{a - t}\right) \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (- a t))))
   (+
    x
    (*
     y
     (-
      (/ (- -1.0 (pow t_1 3.0)) (+ -1.0 (- t_1 (* t_1 t_1))))
      (/ z (- a t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a - t);
	return x + (y * (((-1.0 - pow(t_1, 3.0)) / (-1.0 + (t_1 - (t_1 * t_1)))) - (z / (a - 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
    real(8) :: t_1
    t_1 = t / (a - t)
    code = x + (y * ((((-1.0d0) - (t_1 ** 3.0d0)) / ((-1.0d0) + (t_1 - (t_1 * t_1)))) - (z / (a - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a - t);
	return x + (y * (((-1.0 - Math.pow(t_1, 3.0)) / (-1.0 + (t_1 - (t_1 * t_1)))) - (z / (a - t))));
}
def code(x, y, z, t, a):
	t_1 = t / (a - t)
	return x + (y * (((-1.0 - math.pow(t_1, 3.0)) / (-1.0 + (t_1 - (t_1 * t_1)))) - (z / (a - t))))
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a - t))
	return Float64(x + Float64(y * Float64(Float64(Float64(-1.0 - (t_1 ^ 3.0)) / Float64(-1.0 + Float64(t_1 - Float64(t_1 * t_1)))) - Float64(z / Float64(a - t)))))
end
function tmp = code(x, y, z, t, a)
	t_1 = t / (a - t);
	tmp = x + (y * (((-1.0 - (t_1 ^ 3.0)) / (-1.0 + (t_1 - (t_1 * t_1)))) - (z / (a - t))));
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]}, N[(x + N[(y * N[(N[(N[(-1.0 - N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(t$95$1 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{a - t}\\
x + y \cdot \left(\frac{-1 - {t_1}^{3}}{-1 + \left(t_1 - t_1 \cdot t_1\right)} - \frac{z}{a - t}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 74.3%

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

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

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

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

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

      \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
    6. associate-+r-83.1%

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

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

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

      \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
    10. distribute-frac-neg83.1%

      \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    11. associate-+l+83.1%

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

      \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
    13. distribute-frac-neg88.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + y \cdot \left(\frac{\color{blue}{-1 - {\left(\frac{t}{a - t}\right)}^{3}}}{-\left(1 + \left({\left(\frac{t}{a - t}\right)}^{2} - \frac{t}{a - t}\right)\right)} - \frac{z}{a - t}\right) \]
    4. distribute-neg-in95.1%

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

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

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

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

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

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

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

Alternative 2: 92.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+118} \lor \neg \left(t \leq 2.1 \cdot 10^{+115}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.00000000000000033e118 or 2.10000000000000003e115 < t

    1. Initial program 45.5%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-63.5%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg63.5%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+63.5%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-1 \cdot \left(a \cdot y - \color{blue}{z \cdot y}\right)}{t} \]
      12. distribute-rgt-out--78.7%

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

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

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

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

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

    if -7.00000000000000033e118 < t < 2.10000000000000003e115

    1. Initial program 88.6%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub92.8%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-92.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg94.8%

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

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

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

Alternative 3: 92.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+118} \lor \neg \left(t \leq 1.9 \cdot 10^{+115}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.54999999999999993e118 or 1.9e115 < t

    1. Initial program 45.5%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-63.5%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg63.5%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+63.5%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-1 \cdot \left(a \cdot y - \color{blue}{z \cdot y}\right)}{t} \]
      12. distribute-rgt-out--78.7%

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

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

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

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

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

    if -1.54999999999999993e118 < t < 1.9e115

    1. Initial program 88.6%

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg94.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in94.2%

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg94.2%

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

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

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

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

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

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

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

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

Alternative 4: 92.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+118} \lor \neg \left(t \leq 2.6 \cdot 10^{+115}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.80000000000000016e118 or 2.6e115 < t

    1. Initial program 45.5%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-63.5%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg63.5%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+63.5%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg74.7%

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

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

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

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

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

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

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

    if -3.80000000000000016e118 < t < 2.6e115

    1. Initial program 88.6%

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg94.2%

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
      9. distribute-neg-in94.2%

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg94.2%

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

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

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

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

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

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

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

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

Alternative 5: 93.7% accurate, 0.8× speedup?

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

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

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

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

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

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

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

      \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
    6. associate-+r-83.1%

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

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

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

      \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
    10. distribute-frac-neg83.1%

      \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    11. associate-+l+83.1%

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

      \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
    13. distribute-frac-neg88.1%

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

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

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

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

Alternative 6: 90.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+80} \lor \neg \left(t \leq 1.3 \cdot 10^{+115}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1e80 or 1.3e115 < t

    1. Initial program 45.4%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-63.2%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg63.2%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+63.2%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-1 \cdot \left(a \cdot y - \color{blue}{z \cdot y}\right)}{t} \]
      12. distribute-rgt-out--78.3%

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

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

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

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

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

    if -1e80 < t < 1.3e115

    1. Initial program 90.5%

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

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

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

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

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

Alternative 7: 81.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{-37} \lor \neg \left(a \leq 6 \cdot 10^{+57}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.35000000000000008e-37 or 5.9999999999999999e57 < a

    1. Initial program 76.5%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub90.0%

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

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+90.0%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg93.7%

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

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

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

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

    if -1.35000000000000008e-37 < a < 5.9999999999999999e57

    1. Initial program 72.1%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub76.4%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.4%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+76.4%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg82.7%

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

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

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

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

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

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

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

Alternative 8: 82.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.29999999999999992e62 or 2.2e12 < t

    1. Initial program 51.0%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-67.3%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+67.3%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{-1 \cdot \left(a \cdot y - \color{blue}{z \cdot y}\right)}{t} \]
      12. distribute-rgt-out--75.8%

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

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

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

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

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

    if -1.29999999999999992e62 < t < 2.2e12

    1. Initial program 92.4%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub95.4%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-95.4%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+95.4%

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

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

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

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

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

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

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

Alternative 9: 88.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+41} \lor \neg \left(a \leq 4.8 \cdot 10^{+59}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.25000000000000006e41 or 4.8000000000000004e59 < a

    1. Initial program 75.9%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-91.2%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg91.2%

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

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg93.8%

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

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

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

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

    if -1.25000000000000006e41 < a < 4.8000000000000004e59

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub76.9%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.9%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+76.9%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg83.8%

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

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

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

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

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

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

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

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

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

Alternative 10: 86.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.3 \cdot 10^{+43}:\\
\;\;\;\;x + y \cdot \left(\frac{t}{a - t} + 1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.29999999999999958e43

    1. Initial program 77.8%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub93.0%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-93.0%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+93.0%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg96.5%

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

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

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

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

    if -8.29999999999999958e43 < a < 9.9999999999999995e59

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub76.9%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.9%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+76.9%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg83.8%

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

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

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

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

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

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

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

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

    if 9.9999999999999995e59 < a

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-89.5%

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \left(-\color{blue}{\frac{t}{\frac{a - t}{y}}}\right) \]
      10. distribute-frac-neg89.5%

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+89.5%

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

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

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

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

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

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

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

Alternative 11: 77.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+39}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6500000000000001e39 or 5.5000000000000001e60 < a

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg92.4%

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg92.4%

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

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

      \[\leadsto \color{blue}{x + y} \]
    5. Step-by-step derivation
      1. +-commutative82.6%

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified82.6%

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

    if -1.6500000000000001e39 < a < 5.5000000000000001e60

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub76.9%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.9%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+76.9%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg83.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+39}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+60}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 77.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+39}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.60000000000000024e39 or 1.79999999999999998e58 < a

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
      10. remove-double-neg92.4%

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg92.4%

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

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

      \[\leadsto \color{blue}{x + y} \]
    5. Step-by-step derivation
      1. +-commutative82.6%

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified82.6%

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

    if -4.60000000000000024e39 < a < 1.79999999999999998e58

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(x + y\right) + \color{blue}{\frac{z - t}{\frac{a - t}{-y}}} \]
      5. div-sub76.9%

        \[\leadsto \left(x + y\right) + \color{blue}{\left(\frac{z}{\frac{a - t}{-y}} - \frac{t}{\frac{a - t}{-y}}\right)} \]
      6. associate-+r-76.9%

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

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

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

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

        \[\leadsto \left(\left(x + y\right) + \frac{z}{\frac{a - t}{-y}}\right) - \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
      11. associate-+l+76.9%

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

        \[\leadsto \color{blue}{x + \left(\left(y + \frac{z}{\frac{a - t}{-y}}\right) - \frac{-t}{\frac{a - t}{y}}\right)} \]
      13. distribute-frac-neg83.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+39}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+58}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 61.4% accurate, 2.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 9.39999999999999951e207

    1. Initial program 79.2%

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg88.6%

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg88.6%

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

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

      \[\leadsto \color{blue}{x + y} \]
    5. Step-by-step derivation
      1. +-commutative61.9%

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified61.9%

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

    if 9.39999999999999951e207 < t

    1. Initial program 40.2%

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

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

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

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

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

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

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

        \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
      8. sub-neg55.6%

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

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

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

        \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
      12. sub-neg55.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9.4 \cdot 10^{+207}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 2.7% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 74.3%

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

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

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

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

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

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

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

      \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
    8. sub-neg84.5%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
    9. distribute-neg-in84.5%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
    10. remove-double-neg84.5%

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

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
    12. sub-neg84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(t - z, \frac{y}{a - t}, y + x\right)} \]
  7. Taylor expanded in x around 0 35.8%

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

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

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

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

    \[\leadsto \color{blue}{y + -1 \cdot y} \]
  11. Step-by-step derivation
    1. distribute-rgt1-in2.9%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot y} \]
    2. metadata-eval2.9%

      \[\leadsto \color{blue}{0} \cdot y \]
    3. mul0-lft2.9%

      \[\leadsto \color{blue}{0} \]
  12. Simplified2.9%

    \[\leadsto \color{blue}{0} \]
  13. Final simplification2.9%

    \[\leadsto 0 \]

Alternative 15: 50.5% accurate, 13.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 74.3%

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

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

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

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

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

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

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

      \[\leadsto y + \left(x + \color{blue}{\frac{y}{\frac{a - t}{-\left(z - t\right)}}}\right) \]
    8. sub-neg84.5%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{-\color{blue}{\left(z + \left(-t\right)\right)}}}\right) \]
    9. distribute-neg-in84.5%

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}}\right) \]
    10. remove-double-neg84.5%

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

      \[\leadsto y + \left(x + \frac{y}{\frac{a - t}{\color{blue}{t + \left(-z\right)}}}\right) \]
    12. sub-neg84.5%

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification50.7%

    \[\leadsto x \]

Developer target: 88.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

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


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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