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

Percentage Accurate: 68.8% → 90.9%
Time: 17.6s
Alternatives: 21
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 21 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.8% 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.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-279}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z)))))
   (if (<= t_1 -4e-279)
     (fma (/ (- y z) (- a z)) (- t x) x)
     (if (<= t_1 0.0)
       (+ t (/ (* (- t x) (- a y)) z))
       (+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -4e-279) {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z)))
	tmp = 0.0
	if (t_1 <= -4e-279)
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	else
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(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[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-279], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-279}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

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


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

    1. Initial program 70.3%

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

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

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

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

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

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

    1. Initial program 4.3%

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

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

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

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

      \[\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(y - a\right) \cdot \left(t - x\right)}{z}} \]

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

    1. Initial program 76.5%

      \[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. Step-by-step derivation
      1. *-commutative89.9%

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-279} \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) (- x t)) (- a z)))))
   (if (or (<= t_1 -4e-279) (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) * (x - t)) / (a - z));
	double tmp;
	if ((t_1 <= -4e-279) || !(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) * (x - t)) / (a - z))
    if ((t_1 <= (-4d-279)) .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) * (x - t)) / (a - z));
	double tmp;
	if ((t_1 <= -4e-279) || !(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) * (x - t)) / (a - z))
	tmp = 0
	if (t_1 <= -4e-279) 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(x - t)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -4e-279) || !(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) * (x - t)) / (a - z));
	tmp = 0.0;
	if ((t_1 <= -4e-279) || ~((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[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-279], 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(x - t\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-279} \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.00000000000000022e-279 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    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/90.5%

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

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

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

    1. Initial program 4.3%

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

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

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

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

      \[\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(y - a\right) \cdot \left(t - x\right)}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z} \leq -4 \cdot 10^{-279} \lor \neg \left(x - \frac{\left(y - z\right) \cdot \left(x - t\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: 90.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

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


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

    1. Initial program 70.3%

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

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

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

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

    1. Initial program 4.3%

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

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

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

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

      \[\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(y - a\right) \cdot \left(t - x\right)}{z}} \]

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

    1. Initial program 76.5%

      \[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. Step-by-step derivation
      1. *-commutative89.9%

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

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

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

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

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

Alternative 4: 52.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ t_2 := \frac{-t}{\frac{a - z}{z}}\\ t_3 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -0.004:\\ \;\;\;\;y \cdot \frac{-x}{a - z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-236}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-194}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+18}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t))))
        (t_2 (/ (- t) (/ (- a z) z)))
        (t_3 (* x (- 1.0 (/ y a)))))
   (if (<= z -1.05e+42)
     t_2
     (if (<= z -1.25e+21)
       t_1
       (if (<= z -0.004)
         (* y (/ (- x) (- a z)))
         (if (<= z -2.5e-67)
           (/ (* t (- z y)) z)
           (if (<= z -1.2e-177)
             t_1
             (if (<= z -1.5e-236)
               t_3
               (if (<= z 1.15e-194)
                 (+ x (/ (* y t) a))
                 (if (<= z 1.65e+18) t_3 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = -t / ((a - z) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.05e+42) {
		tmp = t_2;
	} else if (z <= -1.25e+21) {
		tmp = t_1;
	} else if (z <= -0.004) {
		tmp = y * (-x / (a - z));
	} else if (z <= -2.5e-67) {
		tmp = (t * (z - y)) / z;
	} else if (z <= -1.2e-177) {
		tmp = t_1;
	} else if (z <= -1.5e-236) {
		tmp = t_3;
	} else if (z <= 1.15e-194) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e+18) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (y / (a / t))
    t_2 = -t / ((a - z) / z)
    t_3 = x * (1.0d0 - (y / a))
    if (z <= (-1.05d+42)) then
        tmp = t_2
    else if (z <= (-1.25d+21)) then
        tmp = t_1
    else if (z <= (-0.004d0)) then
        tmp = y * (-x / (a - z))
    else if (z <= (-2.5d-67)) then
        tmp = (t * (z - y)) / z
    else if (z <= (-1.2d-177)) then
        tmp = t_1
    else if (z <= (-1.5d-236)) then
        tmp = t_3
    else if (z <= 1.15d-194) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.65d+18) then
        tmp = t_3
    else
        tmp = t_2
    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 / (a / t));
	double t_2 = -t / ((a - z) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.05e+42) {
		tmp = t_2;
	} else if (z <= -1.25e+21) {
		tmp = t_1;
	} else if (z <= -0.004) {
		tmp = y * (-x / (a - z));
	} else if (z <= -2.5e-67) {
		tmp = (t * (z - y)) / z;
	} else if (z <= -1.2e-177) {
		tmp = t_1;
	} else if (z <= -1.5e-236) {
		tmp = t_3;
	} else if (z <= 1.15e-194) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.65e+18) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	t_2 = -t / ((a - z) / z)
	t_3 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -1.05e+42:
		tmp = t_2
	elif z <= -1.25e+21:
		tmp = t_1
	elif z <= -0.004:
		tmp = y * (-x / (a - z))
	elif z <= -2.5e-67:
		tmp = (t * (z - y)) / z
	elif z <= -1.2e-177:
		tmp = t_1
	elif z <= -1.5e-236:
		tmp = t_3
	elif z <= 1.15e-194:
		tmp = x + ((y * t) / a)
	elif z <= 1.65e+18:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	t_2 = Float64(Float64(-t) / Float64(Float64(a - z) / z))
	t_3 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -1.05e+42)
		tmp = t_2;
	elseif (z <= -1.25e+21)
		tmp = t_1;
	elseif (z <= -0.004)
		tmp = Float64(y * Float64(Float64(-x) / Float64(a - z)));
	elseif (z <= -2.5e-67)
		tmp = Float64(Float64(t * Float64(z - y)) / z);
	elseif (z <= -1.2e-177)
		tmp = t_1;
	elseif (z <= -1.5e-236)
		tmp = t_3;
	elseif (z <= 1.15e-194)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.65e+18)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	t_2 = -t / ((a - z) / z);
	t_3 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -1.05e+42)
		tmp = t_2;
	elseif (z <= -1.25e+21)
		tmp = t_1;
	elseif (z <= -0.004)
		tmp = y * (-x / (a - z));
	elseif (z <= -2.5e-67)
		tmp = (t * (z - y)) / z;
	elseif (z <= -1.2e-177)
		tmp = t_1;
	elseif (z <= -1.5e-236)
		tmp = t_3;
	elseif (z <= 1.15e-194)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.65e+18)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+42], t$95$2, If[LessEqual[z, -1.25e+21], t$95$1, If[LessEqual[z, -0.004], N[(y * N[((-x) / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-67], N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.2e-177], t$95$1, If[LessEqual[z, -1.5e-236], t$95$3, If[LessEqual[z, 1.15e-194], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+18], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-177}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-236}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+18}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.04999999999999998e42 or 1.65e18 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    10. Step-by-step derivation
      1. mul-1-neg42.4%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac59.9%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    11. Simplified59.9%

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

    if -1.04999999999999998e42 < z < -1.25e21 or -2.4999999999999999e-67 < z < -1.1999999999999999e-177

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e21 < z < -0.0040000000000000001

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    11. Step-by-step derivation
      1. mul-1-neg52.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{a - z}} \]
    12. Simplified52.4%

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

    if -0.0040000000000000001 < z < -2.4999999999999999e-67

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot t\right) \cdot \left(y - z\right)}}{z} \]
      3. mul-1-neg51.6%

        \[\leadsto \frac{\color{blue}{\left(-t\right)} \cdot \left(y - z\right)}{z} \]
    11. Simplified51.6%

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

    if -1.1999999999999999e-177 < z < -1.50000000000000007e-236 or 1.15000000000000001e-194 < z < 1.65e18

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000007e-236 < z < 1.15000000000000001e-194

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+42}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -0.004:\\ \;\;\;\;y \cdot \frac{-x}{a - z}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-194}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \end{array} \]

Alternative 5: 46.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x + \frac{y}{\frac{a}{t}}\\ \mathbf{if}\;a \leq -2.4 \cdot 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-218}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-89}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (+ x (/ y (/ a t)))))
   (if (<= a -2.4e-11)
     t_2
     (if (<= a -1.08e-125)
       t_1
       (if (<= a -4e-218)
         t
         (if (<= a 3.8e-273)
           t_1
           (if (<= a 2.5e-89)
             t
             (if (<= a 5.2e+90)
               (* x (- 1.0 (/ y a)))
               (if (<= a 9.5e+94) t t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x + (y / (a / t));
	double tmp;
	if (a <= -2.4e-11) {
		tmp = t_2;
	} else if (a <= -1.08e-125) {
		tmp = t_1;
	} else if (a <= -4e-218) {
		tmp = t;
	} else if (a <= 3.8e-273) {
		tmp = t_1;
	} else if (a <= 2.5e-89) {
		tmp = t;
	} else if (a <= 5.2e+90) {
		tmp = x * (1.0 - (y / a));
	} else if (a <= 9.5e+94) {
		tmp = t;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x + (y / (a / t))
    if (a <= (-2.4d-11)) then
        tmp = t_2
    else if (a <= (-1.08d-125)) then
        tmp = t_1
    else if (a <= (-4d-218)) then
        tmp = t
    else if (a <= 3.8d-273) then
        tmp = t_1
    else if (a <= 2.5d-89) then
        tmp = t
    else if (a <= 5.2d+90) then
        tmp = x * (1.0d0 - (y / a))
    else if (a <= 9.5d+94) then
        tmp = t
    else
        tmp = t_2
    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 - a) / z);
	double t_2 = x + (y / (a / t));
	double tmp;
	if (a <= -2.4e-11) {
		tmp = t_2;
	} else if (a <= -1.08e-125) {
		tmp = t_1;
	} else if (a <= -4e-218) {
		tmp = t;
	} else if (a <= 3.8e-273) {
		tmp = t_1;
	} else if (a <= 2.5e-89) {
		tmp = t;
	} else if (a <= 5.2e+90) {
		tmp = x * (1.0 - (y / a));
	} else if (a <= 9.5e+94) {
		tmp = t;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x + (y / (a / t))
	tmp = 0
	if a <= -2.4e-11:
		tmp = t_2
	elif a <= -1.08e-125:
		tmp = t_1
	elif a <= -4e-218:
		tmp = t
	elif a <= 3.8e-273:
		tmp = t_1
	elif a <= 2.5e-89:
		tmp = t
	elif a <= 5.2e+90:
		tmp = x * (1.0 - (y / a))
	elif a <= 9.5e+94:
		tmp = t
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x + Float64(y / Float64(a / t)))
	tmp = 0.0
	if (a <= -2.4e-11)
		tmp = t_2;
	elseif (a <= -1.08e-125)
		tmp = t_1;
	elseif (a <= -4e-218)
		tmp = t;
	elseif (a <= 3.8e-273)
		tmp = t_1;
	elseif (a <= 2.5e-89)
		tmp = t;
	elseif (a <= 5.2e+90)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (a <= 9.5e+94)
		tmp = t;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x + (y / (a / t));
	tmp = 0.0;
	if (a <= -2.4e-11)
		tmp = t_2;
	elseif (a <= -1.08e-125)
		tmp = t_1;
	elseif (a <= -4e-218)
		tmp = t;
	elseif (a <= 3.8e-273)
		tmp = t_1;
	elseif (a <= 2.5e-89)
		tmp = t;
	elseif (a <= 5.2e+90)
		tmp = x * (1.0 - (y / a));
	elseif (a <= 9.5e+94)
		tmp = t;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.4e-11], t$95$2, If[LessEqual[a, -1.08e-125], t$95$1, If[LessEqual[a, -4e-218], t, If[LessEqual[a, 3.8e-273], t$95$1, If[LessEqual[a, 2.5e-89], t, If[LessEqual[a, 5.2e+90], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+94], t, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.08 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4 \cdot 10^{-218}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-273}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-89}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+90}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.4000000000000001e-11 or 9.4999999999999998e94 < a

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e-11 < a < -1.07999999999999998e-125 or -4.0000000000000001e-218 < a < 3.8000000000000004e-273

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - a}}{z} \]
    9. Simplified56.4%

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

    if -1.07999999999999998e-125 < a < -4.0000000000000001e-218 or 3.8000000000000004e-273 < a < 2.49999999999999983e-89 or 5.1999999999999997e90 < a < 9.4999999999999998e94

    1. Initial program 62.4%

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

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

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

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

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

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

    if 2.49999999999999983e-89 < a < 5.1999999999999997e90

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{-11}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-218}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-89}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 6: 46.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x + \frac{y}{\frac{a}{t}}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.46 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-219}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-88}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+91}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (+ x (/ y (/ a t)))))
   (if (<= a -2.1e-14)
     t_2
     (if (<= a -1.46e-130)
       t_1
       (if (<= a -6e-219)
         t
         (if (<= a 6.5e-273)
           t_1
           (if (<= a 1.45e-88)
             t
             (if (<= a 6e+91)
               (- x (/ y (/ a x)))
               (if (<= a 9.5e+94) t t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x + (y / (a / t));
	double tmp;
	if (a <= -2.1e-14) {
		tmp = t_2;
	} else if (a <= -1.46e-130) {
		tmp = t_1;
	} else if (a <= -6e-219) {
		tmp = t;
	} else if (a <= 6.5e-273) {
		tmp = t_1;
	} else if (a <= 1.45e-88) {
		tmp = t;
	} else if (a <= 6e+91) {
		tmp = x - (y / (a / x));
	} else if (a <= 9.5e+94) {
		tmp = t;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x + (y / (a / t))
    if (a <= (-2.1d-14)) then
        tmp = t_2
    else if (a <= (-1.46d-130)) then
        tmp = t_1
    else if (a <= (-6d-219)) then
        tmp = t
    else if (a <= 6.5d-273) then
        tmp = t_1
    else if (a <= 1.45d-88) then
        tmp = t
    else if (a <= 6d+91) then
        tmp = x - (y / (a / x))
    else if (a <= 9.5d+94) then
        tmp = t
    else
        tmp = t_2
    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 - a) / z);
	double t_2 = x + (y / (a / t));
	double tmp;
	if (a <= -2.1e-14) {
		tmp = t_2;
	} else if (a <= -1.46e-130) {
		tmp = t_1;
	} else if (a <= -6e-219) {
		tmp = t;
	} else if (a <= 6.5e-273) {
		tmp = t_1;
	} else if (a <= 1.45e-88) {
		tmp = t;
	} else if (a <= 6e+91) {
		tmp = x - (y / (a / x));
	} else if (a <= 9.5e+94) {
		tmp = t;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x + (y / (a / t))
	tmp = 0
	if a <= -2.1e-14:
		tmp = t_2
	elif a <= -1.46e-130:
		tmp = t_1
	elif a <= -6e-219:
		tmp = t
	elif a <= 6.5e-273:
		tmp = t_1
	elif a <= 1.45e-88:
		tmp = t
	elif a <= 6e+91:
		tmp = x - (y / (a / x))
	elif a <= 9.5e+94:
		tmp = t
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x + Float64(y / Float64(a / t)))
	tmp = 0.0
	if (a <= -2.1e-14)
		tmp = t_2;
	elseif (a <= -1.46e-130)
		tmp = t_1;
	elseif (a <= -6e-219)
		tmp = t;
	elseif (a <= 6.5e-273)
		tmp = t_1;
	elseif (a <= 1.45e-88)
		tmp = t;
	elseif (a <= 6e+91)
		tmp = Float64(x - Float64(y / Float64(a / x)));
	elseif (a <= 9.5e+94)
		tmp = t;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x + (y / (a / t));
	tmp = 0.0;
	if (a <= -2.1e-14)
		tmp = t_2;
	elseif (a <= -1.46e-130)
		tmp = t_1;
	elseif (a <= -6e-219)
		tmp = t;
	elseif (a <= 6.5e-273)
		tmp = t_1;
	elseif (a <= 1.45e-88)
		tmp = t;
	elseif (a <= 6e+91)
		tmp = x - (y / (a / x));
	elseif (a <= 9.5e+94)
		tmp = t;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e-14], t$95$2, If[LessEqual[a, -1.46e-130], t$95$1, If[LessEqual[a, -6e-219], t, If[LessEqual[a, 6.5e-273], t$95$1, If[LessEqual[a, 1.45e-88], t, If[LessEqual[a, 6e+91], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+94], t, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.46 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6 \cdot 10^{-219}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-273}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-88}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.0999999999999999e-14 or 9.4999999999999998e94 < a

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-14 < a < -1.46e-130 or -6.0000000000000002e-219 < a < 6.49999999999999979e-273

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - a}}{z} \]
    9. Simplified56.4%

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

    if -1.46e-130 < a < -6.0000000000000002e-219 or 6.49999999999999979e-273 < a < 1.4500000000000001e-88 or 6.00000000000000012e91 < a < 9.4999999999999998e94

    1. Initial program 62.4%

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

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

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

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

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

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

    if 1.4500000000000001e-88 < a < 6.00000000000000012e91

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg38.9%

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

        \[\leadsto \color{blue}{x - \frac{y \cdot x}{a}} \]
      4. associate-/l*42.1%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    9. Simplified42.1%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.46 \cdot 10^{-130}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-219}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-88}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+91}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 7: 76.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y - a}{\frac{z}{t - x}}\\
t_2 := x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;a \leq -50000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 10^{-88}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 25000000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 7 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+78}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5e7 or 9.99999999999999934e-89 < a < 2.5e13 or 2.20000000000000014e78 < a

    1. Initial program 72.5%

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

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

    if -5e7 < a < 9.99999999999999934e-89 or 2.5e13 < a < 7.0000000000000002e43

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000002e43 < a < 2.20000000000000014e78

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -50000000:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 10^{-88}:\\ \;\;\;\;t - \frac{y - a}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 25000000000000:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+43}:\\ \;\;\;\;t - \frac{y - a}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+78}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \end{array} \]

Alternative 8: 54.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{\frac{a - z}{z}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-175}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- t) (/ (- a z) z))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.1e+43)
     t_1
     (if (<= z -3.8e-175)
       (+ x (/ y (/ a t)))
       (if (<= z -3.4e-236)
         t_2
         (if (<= z 2.4e-196)
           (+ x (/ (* y t) a))
           (if (<= z 1.4e+18) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / ((a - z) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.1e+43) {
		tmp = t_1;
	} else if (z <= -3.8e-175) {
		tmp = x + (y / (a / t));
	} else if (z <= -3.4e-236) {
		tmp = t_2;
	} else if (z <= 2.4e-196) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.4e+18) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = -t / ((a - z) / z)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-2.1d+43)) then
        tmp = t_1
    else if (z <= (-3.8d-175)) then
        tmp = x + (y / (a / t))
    else if (z <= (-3.4d-236)) then
        tmp = t_2
    else if (z <= 2.4d-196) then
        tmp = x + ((y * t) / a)
    else if (z <= 1.4d+18) then
        tmp = t_2
    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 / ((a - z) / z);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.1e+43) {
		tmp = t_1;
	} else if (z <= -3.8e-175) {
		tmp = x + (y / (a / t));
	} else if (z <= -3.4e-236) {
		tmp = t_2;
	} else if (z <= 2.4e-196) {
		tmp = x + ((y * t) / a);
	} else if (z <= 1.4e+18) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -t / ((a - z) / z)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.1e+43:
		tmp = t_1
	elif z <= -3.8e-175:
		tmp = x + (y / (a / t))
	elif z <= -3.4e-236:
		tmp = t_2
	elif z <= 2.4e-196:
		tmp = x + ((y * t) / a)
	elif z <= 1.4e+18:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) / Float64(Float64(a - z) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.1e+43)
		tmp = t_1;
	elseif (z <= -3.8e-175)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= -3.4e-236)
		tmp = t_2;
	elseif (z <= 2.4e-196)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 1.4e+18)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -t / ((a - z) / z);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.1e+43)
		tmp = t_1;
	elseif (z <= -3.8e-175)
		tmp = x + (y / (a / t));
	elseif (z <= -3.4e-236)
		tmp = t_2;
	elseif (z <= 2.4e-196)
		tmp = x + ((y * t) / a);
	elseif (z <= 1.4e+18)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+43], t$95$1, If[LessEqual[z, -3.8e-175], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-236], t$95$2, If[LessEqual[z, 2.4e-196], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+18], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-236}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.10000000000000002e43 or 1.4e18 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    10. Step-by-step derivation
      1. mul-1-neg42.4%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac59.9%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    11. Simplified59.9%

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

    if -2.10000000000000002e43 < z < -3.8e-175

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e-175 < z < -3.3999999999999998e-236 or 2.40000000000000021e-196 < z < 1.4e18

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999998e-236 < z < 2.40000000000000021e-196

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+43}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-175}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \end{array} \]

Alternative 9: 58.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -8 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{+194}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.14999999999999997e277 or 4.6000000000000001e194 < x

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.14999999999999997e277 < x < -8.0000000000000001e173 or 5.59999999999999966e30 < x < 4.6000000000000001e194

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - a}}{z} \]
    9. Simplified58.1%

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

    if -8.0000000000000001e173 < x < -1.4499999999999999e103

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg75.4%

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

        \[\leadsto \color{blue}{x - \frac{y \cdot x}{a}} \]
      4. associate-/l*82.1%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    9. Simplified82.1%

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

    if -1.4499999999999999e103 < x < 5.59999999999999966e30

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+277}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+103}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+194}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 10: 75.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.4999999999999996e41 or 112 < z

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999996e41 < z < 112

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

Alternative 11: 33.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq -3.5 \cdot 10^{+97}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -4.9 \cdot 10^{-14} \lor \neg \left(x \leq 4.8 \cdot 10^{+28}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.4000000000000002e139 or -3.5000000000000001e97 < x < -4.89999999999999995e-14 or 4.79999999999999962e28 < x

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - a}}{z} \]
    9. Simplified49.9%

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

    if -6.4000000000000002e139 < x < -3.5000000000000001e97

    1. Initial program 75.3%

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

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

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

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

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

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

    if -4.89999999999999995e-14 < x < 4.79999999999999962e28

    1. Initial program 75.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+97}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-14} \lor \neg \left(x \leq 4.8 \cdot 10^{+28}\right):\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 48.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -6 \cdot 10^{+151}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -1.3 \cdot 10^{+43}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.66 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.4999999999999997e197 or -5.9999999999999998e151 < z < -1.3000000000000001e43 or 1.66e18 < z

    1. Initial program 46.9%

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

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

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

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

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

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

    if -9.4999999999999997e197 < z < -5.9999999999999998e151

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - a}}{z} \]
    9. Simplified60.9%

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

    if -1.3000000000000001e43 < z < 1.66e18

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+197}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+151}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 48.6% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq -2.9 \cdot 10^{+43}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.6000000000000003e197 or -7.79999999999999981e150 < z < -2.9000000000000002e43 or 1.45e18 < z

    1. Initial program 46.9%

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

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

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

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

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

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

    if -7.6000000000000003e197 < z < -7.79999999999999981e150

    1. Initial program 32.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{a + -1 \cdot y}{\frac{z}{x}}} \]
      3. mul-1-neg61.1%

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

        \[\leadsto -\frac{\color{blue}{a - y}}{\frac{z}{x}} \]
      5. distribute-neg-frac61.1%

        \[\leadsto \color{blue}{\frac{-\left(a - y\right)}{\frac{z}{x}}} \]
      6. mul-1-neg61.1%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(a - y\right)}}{\frac{z}{x}} \]
      7. sub-neg61.1%

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

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

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

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

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

        \[\leadsto \frac{\left(-\color{blue}{\left(-y\right)}\right) + -1 \cdot a}{\frac{z}{x}} \]
      13. remove-double-neg61.1%

        \[\leadsto \frac{\color{blue}{y} + -1 \cdot a}{\frac{z}{x}} \]
      14. mul-1-neg61.1%

        \[\leadsto \frac{y + \color{blue}{\left(-a\right)}}{\frac{z}{x}} \]
      15. sub-neg61.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}} - \frac{a}{\frac{z}{x}}} \]
      5. div-sub61.1%

        \[\leadsto \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
      6. *-rgt-identity61.1%

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

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

        \[\leadsto \left(y - a\right) \cdot \color{blue}{\left(\frac{1}{z} \cdot x\right)} \]
      9. associate-*l/61.1%

        \[\leadsto \left(y - a\right) \cdot \color{blue}{\frac{1 \cdot x}{z}} \]
      10. *-lft-identity61.1%

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

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

    if -2.9000000000000002e43 < z < 1.45e18

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+197}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{+150}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 65.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+75} \lor \neg \left(x \leq 3 \cdot 10^{+48}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.5500000000000001e75 or 3e48 < x

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

    if -1.5500000000000001e75 < x < 3e48

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

Alternative 15: 70.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.9 \cdot 10^{+118} \lor \neg \left(x \leq 8 \cdot 10^{+49}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.90000000000000003e118 or 7.99999999999999957e49 < x

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

    if -6.90000000000000003e118 < x < 7.99999999999999957e49

    1. Initial program 74.3%

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

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

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

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

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

Alternative 16: 66.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+42} \lor \neg \left(z \leq 1.42 \cdot 10^{+18}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2999999999999998e42 or 1.42e18 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

    if -4.2999999999999998e42 < z < 1.42e18

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 67.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+42} \lor \neg \left(z \leq 1.45 \cdot 10^{+18}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e42 or 1.45e18 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

    if -2.3e42 < z < 1.45e18

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

Alternative 18: 67.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 44.5%

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

        \[\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.0%

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

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

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

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

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

    if -1.60000000000000007e43 < z < 1.4e18

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

    if 1.4e18 < z

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 19: 39.2% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+18}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999998e43 or 1.6e18 < z

    1. Initial program 45.7%

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

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

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

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

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

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

    if -6.4999999999999998e43 < z < 1.6e18

    1. Initial program 87.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 2.8% accurate, 13.0× speedup?

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

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

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Taylor expanded in t around 0 38.2%

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x + x} \]
  6. Step-by-step derivation
    1. distribute-lft1-in2.9%

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

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

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

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

    \[\leadsto 0 \]

Alternative 21: 25.1% 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 68.4%

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

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

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

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

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

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

    \[\leadsto t \]

Developer target: 84.9% 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 2023200 
(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))))