Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 68.5% → 90.5%
Time: 17.9s
Alternatives: 20
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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: 68.5% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-246} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -5e-246) (not (<= t_1 0.0)))
     (fma (/ (- y z) (- a z)) (- t x) x)
     (+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-246) || !(t_1 <= 0.0)) {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	} else {
		tmp = t + (((t - x) * (a - y)) / z);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -5e-246) || !(t_1 <= 0.0))
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	else
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-246], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-246} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999997e-246 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 71.3%

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

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

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

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

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

    if -4.9999999999999997e-246 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 13.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -5 \cdot 10^{-246} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]

Alternative 2: 90.5% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999997e-246 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 71.3%

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

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

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

    if -4.9999999999999997e-246 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 13.7%

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

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

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

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

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

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

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

Alternative 3: 74.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+92} \lor \neg \left(z \leq 1.62 \cdot 10^{+146}\right) \land z \leq 9.5 \cdot 10^{+190}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ x (/ z (- y a))))))
   (if (<= z -4.5e+25)
     t_1
     (if (<= z 2.6e-157)
       (+ x (/ (- t x) (/ a (- y z))))
       (if (or (<= z 4.2e+92) (and (not (<= z 1.62e+146)) (<= z 9.5e+190)))
         (+ x (/ (- y z) (/ (- a z) t)))
         t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x / (z / (y - a)));
	double tmp;
	if (z <= -4.5e+25) {
		tmp = t_1;
	} else if (z <= 2.6e-157) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else if ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190))) {
		tmp = x + ((y - z) / ((a - z) / 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) :: tmp
    t_1 = t + (x / (z / (y - a)))
    if (z <= (-4.5d+25)) then
        tmp = t_1
    else if (z <= 2.6d-157) then
        tmp = x + ((t - x) / (a / (y - z)))
    else if ((z <= 4.2d+92) .or. (.not. (z <= 1.62d+146)) .and. (z <= 9.5d+190)) then
        tmp = x + ((y - z) / ((a - z) / 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 = t + (x / (z / (y - a)));
	double tmp;
	if (z <= -4.5e+25) {
		tmp = t_1;
	} else if (z <= 2.6e-157) {
		tmp = x + ((t - x) / (a / (y - z)));
	} else if ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190))) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x / (z / (y - a)))
	tmp = 0
	if z <= -4.5e+25:
		tmp = t_1
	elif z <= 2.6e-157:
		tmp = x + ((t - x) / (a / (y - z)))
	elif (z <= 4.2e+92) or (not (z <= 1.62e+146) and (z <= 9.5e+190)):
		tmp = x + ((y - z) / ((a - z) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a))))
	tmp = 0.0
	if (z <= -4.5e+25)
		tmp = t_1;
	elseif (z <= 2.6e-157)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z))));
	elseif ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190)))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (x / (z / (y - a)));
	tmp = 0.0;
	if (z <= -4.5e+25)
		tmp = t_1;
	elseif (z <= 2.6e-157)
		tmp = x + ((t - x) / (a / (y - z)));
	elseif ((z <= 4.2e+92) || (~((z <= 1.62e+146)) && (z <= 9.5e+190)))
		tmp = x + ((y - z) / ((a - z) / t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+25], t$95$1, If[LessEqual[z, 2.6e-157], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.2e+92], And[N[Not[LessEqual[z, 1.62e+146]], $MachinePrecision], LessEqual[z, 9.5e+190]]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+92} \lor \neg \left(z \leq 1.62 \cdot 10^{+146}\right) \land z \leq 9.5 \cdot 10^{+190}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5000000000000003e25 or 4.19999999999999972e92 < z < 1.62e146 or 9.4999999999999995e190 < z

    1. Initial program 43.8%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--85.3%

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

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

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

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

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

    if -4.5000000000000003e25 < z < 2.59999999999999988e-157

    1. Initial program 92.1%

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

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

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

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

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

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

    if 2.59999999999999988e-157 < z < 4.19999999999999972e92 or 1.62e146 < z < 9.4999999999999995e190

    1. Initial program 69.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+25}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+92} \lor \neg \left(z \leq 1.62 \cdot 10^{+146}\right) \land z \leq 9.5 \cdot 10^{+190}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 4: 59.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x}{\frac{z}{y}}\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{+88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3600:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 1560000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+74} \lor \neg \left(x \leq 2.8 \cdot 10^{+132}\right):\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ x (/ z y)))))
   (if (<= x -5.6e+88)
     t_1
     (if (<= x -3600.0)
       (+ x (/ t (/ a y)))
       (if (<= x 1560000.0)
         (* t (/ (- y z) (- a z)))
         (if (or (<= x 1.02e+74) (not (<= x 2.8e+132)))
           (- x (/ x (/ a y)))
           t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x / (z / y));
	double tmp;
	if (x <= -5.6e+88) {
		tmp = t_1;
	} else if (x <= -3600.0) {
		tmp = x + (t / (a / y));
	} else if (x <= 1560000.0) {
		tmp = t * ((y - z) / (a - z));
	} else if ((x <= 1.02e+74) || !(x <= 2.8e+132)) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (x / (z / y))
    if (x <= (-5.6d+88)) then
        tmp = t_1
    else if (x <= (-3600.0d0)) then
        tmp = x + (t / (a / y))
    else if (x <= 1560000.0d0) then
        tmp = t * ((y - z) / (a - z))
    else if ((x <= 1.02d+74) .or. (.not. (x <= 2.8d+132))) then
        tmp = x - (x / (a / y))
    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 = t + (x / (z / y));
	double tmp;
	if (x <= -5.6e+88) {
		tmp = t_1;
	} else if (x <= -3600.0) {
		tmp = x + (t / (a / y));
	} else if (x <= 1560000.0) {
		tmp = t * ((y - z) / (a - z));
	} else if ((x <= 1.02e+74) || !(x <= 2.8e+132)) {
		tmp = x - (x / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x / (z / y))
	tmp = 0
	if x <= -5.6e+88:
		tmp = t_1
	elif x <= -3600.0:
		tmp = x + (t / (a / y))
	elif x <= 1560000.0:
		tmp = t * ((y - z) / (a - z))
	elif (x <= 1.02e+74) or not (x <= 2.8e+132):
		tmp = x - (x / (a / y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x / Float64(z / y)))
	tmp = 0.0
	if (x <= -5.6e+88)
		tmp = t_1;
	elseif (x <= -3600.0)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	elseif (x <= 1560000.0)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif ((x <= 1.02e+74) || !(x <= 2.8e+132))
		tmp = Float64(x - Float64(x / Float64(a / y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (x / (z / y));
	tmp = 0.0;
	if (x <= -5.6e+88)
		tmp = t_1;
	elseif (x <= -3600.0)
		tmp = x + (t / (a / y));
	elseif (x <= 1560000.0)
		tmp = t * ((y - z) / (a - z));
	elseif ((x <= 1.02e+74) || ~((x <= 2.8e+132)))
		tmp = x - (x / (a / y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+88], t$95$1, If[LessEqual[x, -3600.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1560000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.02e+74], N[Not[LessEqual[x, 2.8e+132]], $MachinePrecision]], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+88}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3600:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;x \leq 1560000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{elif}\;x \leq 1.02 \cdot 10^{+74} \lor \neg \left(x \leq 2.8 \cdot 10^{+132}\right):\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -5.59999999999999977e88 or 1.02000000000000005e74 < x < 2.7999999999999999e132

    1. Initial program 48.1%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--73.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} + t \]
    12. Simplified62.9%

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

    if -5.59999999999999977e88 < x < -3600

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

    if -3600 < x < 1.56e6

    1. Initial program 76.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      3. *-commutative77.4%

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

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

    if 1.56e6 < x < 1.02000000000000005e74 or 2.7999999999999999e132 < x

    1. Initial program 58.2%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified60.5%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg55.5%

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

        \[\leadsto x + \left(-\color{blue}{\frac{x}{\frac{a}{y}}}\right) \]
    9. Simplified58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{+88}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -3600:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 1560000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+74} \lor \neg \left(x \leq 2.8 \cdot 10^{+132}\right):\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \end{array} \]

Alternative 5: 71.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.06 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15999999999999992e25 or 2.59999999999999988e58 < z < 9.7999999999999996e147 or 1.06000000000000003e191 < z

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--85.1%

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

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

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

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

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

    if -1.15999999999999992e25 < z < 2.59999999999999988e58

    1. Initial program 89.4%

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

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

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

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

    if 9.7999999999999996e147 < z < 1.06000000000000003e191

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{+25}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+58}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.06 \cdot 10^{+191}\right):\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 6: 70.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.35 \cdot 10^{+146} \lor \neg \left(z \leq 5.5 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2000000000000001e25 or 3.9000000000000001e58 < z < 3.35000000000000003e146 or 5.5000000000000002e191 < z

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--85.1%

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

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

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

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

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

    if -2.2000000000000001e25 < z < 3.9000000000000001e58

    1. Initial program 89.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified75.6%

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

    if 3.35000000000000003e146 < z < 5.5000000000000002e191

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+25}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+58}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 3.35 \cdot 10^{+146} \lor \neg \left(z \leq 5.5 \cdot 10^{+191}\right):\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 7: 73.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+148} \lor \neg \left(z \leq 2 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.1999999999999997e25 or 8.2e58 < z < 2.0000000000000001e148 or 2.00000000000000015e191 < z

    1. Initial program 44.9%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--85.1%

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

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

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

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

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

    if -5.1999999999999997e25 < z < 8.2e58

    1. Initial program 89.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
    6. Simplified78.4%

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

    if 2.0000000000000001e148 < z < 2.00000000000000015e191

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+25}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+58}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+148} \lor \neg \left(z \leq 2 \cdot 10^{+191}\right):\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 8: 61.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -880:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;x \leq 1300000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{elif}\;x \leq 9.4 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.99999999999999968e88 or 9.40000000000000069e72 < x

    1. Initial program 48.3%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--65.3%

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

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

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

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

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

    if -7.99999999999999968e88 < x < -880

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

    if -880 < x < 1.3e6

    1. Initial program 76.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      3. *-commutative77.4%

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

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

    if 1.3e6 < x < 9.40000000000000069e72

    1. Initial program 73.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    6. Simplified69.6%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg69.2%

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

        \[\leadsto x + \left(-\color{blue}{\frac{x}{\frac{a}{y}}}\right) \]
    9. Simplified69.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+88}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;x \leq -880:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq 1300000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 9.4 \cdot 10^{+72}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 9: 56.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0023:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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

\mathbf{elif}\;a \leq 8.6 \cdot 10^{+19} \lor \neg \left(a \leq 8 \cdot 10^{+172}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

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


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

    1. Initial program 71.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    7. Simplified63.4%

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

    if -0.0023 < a < 7.9000000000000002e-50

    1. Initial program 65.2%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--86.6%

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

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

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

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    9. Simplified76.5%

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

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

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

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

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

    if 7.9000000000000002e-50 < a < 8.6e19 or 8.0000000000000007e172 < a

    1. Initial program 66.1%

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

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

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

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

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

    if 8.6e19 < a < 8.0000000000000007e172

    1. Initial program 67.3%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--58.2%

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

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

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

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

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

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

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

        \[\leadsto t + \frac{x}{\frac{\color{blue}{-z}}{a}} \]
    12. Simplified53.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.0023:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 7.9 \cdot 10^{-50}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+19} \lor \neg \left(a \leq 8 \cdot 10^{+172}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{\frac{-z}{a}}\\ \end{array} \]

Alternative 10: 73.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.9000000000000001e-31 or 2.4e-194 < a

    1. Initial program 67.3%

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

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

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

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

    if -2.9000000000000001e-31 < a < 2.4e-194

    1. Initial program 66.6%

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

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

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

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

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

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

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

Alternative 11: 76.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.79999999999999984e-9 or 1.2999999999999999e-109 < a

    1. Initial program 69.3%

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

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

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

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

    if -2.79999999999999984e-9 < a < 1.2999999999999999e-109

    1. Initial program 64.0%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--89.7%

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

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

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

Alternative 12: 55.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+26} \lor \neg \left(z \leq 4.8 \cdot 10^{+57}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000002e26 or 4.80000000000000009e57 < z

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

    if -4.2000000000000002e26 < z < 4.80000000000000009e57

    1. Initial program 89.3%

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

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

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

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

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

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

Alternative 13: 57.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+26} \lor \neg \left(z \leq 1.4 \cdot 10^{+53}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8500000000000002e26 or 1.4e53 < z

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

    if -2.8500000000000002e26 < z < 1.4e53

    1. Initial program 89.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    7. Simplified63.9%

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

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

Alternative 14: 60.3% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000002e26 or 2.59999999999999988e58 < z

    1. Initial program 44.0%

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{t - x}{\frac{z}{-1 \cdot y - -1 \cdot a}}} \]
      2. distribute-lft-out--81.8%

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

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

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

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    9. Simplified75.5%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} + t \]
    12. Simplified68.9%

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

    if -4.2000000000000002e26 < z < 2.59999999999999988e58

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

Alternative 15: 47.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-13}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4.7 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.80000000000000009e-13

    1. Initial program 71.1%

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

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

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

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

    if -7.80000000000000009e-13 < a < 4.69999999999999996e69

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

    if 4.69999999999999996e69 < a

    1. Initial program 65.0%

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

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

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

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

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

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

Alternative 16: 39.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+26}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 11000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+220}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.60000000000000002e26 or 1.89999999999999992e220 < z

    1. Initial program 44.6%

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

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

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

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

    if -2.60000000000000002e26 < z < 1.1e7

    1. Initial program 90.8%

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

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

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

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

    if 1.1e7 < z < 1.89999999999999992e220

    1. Initial program 49.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+26}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 11000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+220}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 37.5% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+220}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.60000000000000016e-92 or 2.4000000000000001e-141 < z < 1.7e220

    1. Initial program 61.0%

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

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

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

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

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

    if -3.60000000000000016e-92 < z < 2.4000000000000001e-141

    1. Initial program 97.0%

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

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

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

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

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

    if 1.7e220 < z

    1. Initial program 18.4%

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-92}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-141}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+220}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 39.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+57}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{elif}\;y \leq 4.1 \cdot 10^{+102}:\\
\;\;\;\;x + t\\

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    9. Simplified40.7%

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

    if -1.12000000000000003e57 < y < 4.1e102

    1. Initial program 69.5%

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

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

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

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

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

    if 4.1e102 < y

    1. Initial program 67.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+57}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+102}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]

Alternative 19: 39.3% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+25}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+58}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7e25 or 3.4000000000000001e58 < z

    1. Initial program 44.0%

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

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

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

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

    if -2.7e25 < z < 3.4000000000000001e58

    1. Initial program 89.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+25}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+58}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 25.8% accurate, 13.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification30.5%

    \[\leadsto t \]

Developer target: 84.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023297 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

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