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

Percentage Accurate: 68.2% → 90.2%
Time: 16.4s
Alternatives: 24
Speedup: 1.0×

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 24 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.2% 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.2% 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 -5 \cdot 10^{-243}:\\ \;\;\;\;x + \left(t - x\right) \cdot \left(\left(z - y\right) \cdot \frac{-1}{a - z}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z} + \left(t + \frac{\left(t - x\right) \cdot a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\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 -5e-243)
     (+ x (* (- t x) (* (- z y) (/ -1.0 (- a z)))))
     (if (<= t_1 0.0)
       (+ (/ (* y (- x t)) z) (+ t (/ (* (- t x) a) z)))
       (- x (/ (- x t) (/ (- 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 <= -5e-243) {
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	} else if (t_1 <= 0.0) {
		tmp = ((y * (x - t)) / z) + (t + (((t - x) * a) / z));
	} else {
		tmp = x - ((x - 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) :: t_1
    real(8) :: tmp
    t_1 = x - (((y - z) * (x - t)) / (a - z))
    if (t_1 <= (-5d-243)) then
        tmp = x + ((t - x) * ((z - y) * ((-1.0d0) / (a - z))))
    else if (t_1 <= 0.0d0) then
        tmp = ((y * (x - t)) / z) + (t + (((t - x) * a) / z))
    else
        tmp = x - ((x - 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 t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -5e-243) {
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	} else if (t_1 <= 0.0) {
		tmp = ((y * (x - t)) / z) + (t + (((t - x) * a) / z));
	} else {
		tmp = x - ((x - t) / ((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 <= -5e-243:
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))))
	elif t_1 <= 0.0:
		tmp = ((y * (x - t)) / z) + (t + (((t - x) * a) / z))
	else:
		tmp = x - ((x - t) / ((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 <= -5e-243)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(z - y) * Float64(-1.0 / Float64(a - z)))));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(y * Float64(x - t)) / z) + Float64(t + Float64(Float64(Float64(t - x) * a) / z)));
	else
		tmp = Float64(x - Float64(Float64(x - t) / 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 <= -5e-243)
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	elseif (t_1 <= 0.0)
		tmp = ((y * (x - t)) / z) + (t + (((t - x) * a) / z));
	else
		tmp = x - ((x - t) / ((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, -5e-243], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] * N[(-1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t + N[(N[(N[(t - x), $MachinePrecision] * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $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 -5 \cdot 10^{-243}:\\
\;\;\;\;x + \left(t - x\right) \cdot \left(\left(z - y\right) \cdot \frac{-1}{a - z}\right)\\

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\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))) < -5e-243

    1. Initial program 73.1%

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

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

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

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

Alternative 2: 90.2% 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 -5 \cdot 10^{-243} \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 -5e-243) (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 <= -5e-243) || !(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 <= (-5d-243)) .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 <= -5e-243) || !(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 <= -5e-243) 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 <= -5e-243) || !(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 <= -5e-243) || ~((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, -5e-243], 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 -5 \cdot 10^{-243} \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))) < -5e-243 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 74.5%

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z} \leq -5 \cdot 10^{-243} \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.3% 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 -5 \cdot 10^{-243}:\\ \;\;\;\;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{x - t}{\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 -5e-243)
     (+ x (* (- t x) (/ (- y z) (- a z))))
     (if (<= t_1 0.0)
       (+ t (/ (* (- t x) (- a y)) z))
       (- x (/ (- x t) (/ (- 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 <= -5e-243) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x - ((x - 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) :: t_1
    real(8) :: tmp
    t_1 = x - (((y - z) * (x - t)) / (a - z))
    if (t_1 <= (-5d-243)) 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 - ((x - 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 t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -5e-243) {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x - ((x - t) / ((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 <= -5e-243:
		tmp = x + ((t - x) * ((y - z) / (a - z)))
	elif t_1 <= 0.0:
		tmp = t + (((t - x) * (a - y)) / z)
	else:
		tmp = x - ((x - t) / ((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 <= -5e-243)
		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(x - t) / 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 <= -5e-243)
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	elseif (t_1 <= 0.0)
		tmp = t + (((t - x) * (a - y)) / z);
	else
		tmp = x - ((x - t) / ((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, -5e-243], 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[(x - t), $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 -5 \cdot 10^{-243}:\\
\;\;\;\;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{x - t}{\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))) < -5e-243

    1. Initial program 73.1%

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z} \leq -5 \cdot 10^{-243}:\\ \;\;\;\;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{x - t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 4: 90.2% 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 -5 \cdot 10^{-243}:\\ \;\;\;\;x + \left(t - x\right) \cdot \left(\left(z - y\right) \cdot \frac{-1}{a - z}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\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 -5e-243)
     (+ x (* (- t x) (* (- z y) (/ -1.0 (- a z)))))
     (if (<= t_1 0.0)
       (+ t (/ (* (- t x) (- a y)) z))
       (- x (/ (- x t) (/ (- 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 <= -5e-243) {
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x - ((x - 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) :: t_1
    real(8) :: tmp
    t_1 = x - (((y - z) * (x - t)) / (a - z))
    if (t_1 <= (-5d-243)) then
        tmp = x + ((t - x) * ((z - y) * ((-1.0d0) / (a - z))))
    else if (t_1 <= 0.0d0) then
        tmp = t + (((t - x) * (a - y)) / z)
    else
        tmp = x - ((x - 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 t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -5e-243) {
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x - ((x - t) / ((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 <= -5e-243:
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))))
	elif t_1 <= 0.0:
		tmp = t + (((t - x) * (a - y)) / z)
	else:
		tmp = x - ((x - t) / ((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 <= -5e-243)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(z - y) * Float64(-1.0 / 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(x - t) / 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 <= -5e-243)
		tmp = x + ((t - x) * ((z - y) * (-1.0 / (a - z))));
	elseif (t_1 <= 0.0)
		tmp = t + (((t - x) * (a - y)) / z);
	else
		tmp = x - ((x - t) / ((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, -5e-243], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] * N[(-1.0 / N[(a - z), $MachinePrecision]), $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[(x - t), $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 -5 \cdot 10^{-243}:\\
\;\;\;\;x + \left(t - x\right) \cdot \left(\left(z - y\right) \cdot \frac{-1}{a - z}\right)\\

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

\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\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))) < -5e-243

    1. Initial program 73.1%

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

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

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

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z} \leq -5 \cdot 10^{-243}:\\ \;\;\;\;x + \left(t - x\right) \cdot \left(\left(z - y\right) \cdot \frac{-1}{a - z}\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{x - t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 5: 43.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-229}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.4e+37)
     t
     (if (<= z -2.2e-126)
       t_2
       (if (<= z -3.7e-271)
         t_1
         (if (<= z 1.7e-229)
           t_2
           (if (<= z 1.5e-54)
             t_1
             (if (<= z 5.8e-30)
               x
               (if (<= z 2.4e+95) (* x (/ (- y a) z)) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.4e+37) {
		tmp = t;
	} else if (z <= -2.2e-126) {
		tmp = t_2;
	} else if (z <= -3.7e-271) {
		tmp = t_1;
	} else if (z <= 1.7e-229) {
		tmp = t_2;
	} else if (z <= 1.5e-54) {
		tmp = t_1;
	} else if (z <= 5.8e-30) {
		tmp = x;
	} else if (z <= 2.4e+95) {
		tmp = x * ((y - a) / z);
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-2.4d+37)) then
        tmp = t
    else if (z <= (-2.2d-126)) then
        tmp = t_2
    else if (z <= (-3.7d-271)) then
        tmp = t_1
    else if (z <= 1.7d-229) then
        tmp = t_2
    else if (z <= 1.5d-54) then
        tmp = t_1
    else if (z <= 5.8d-30) then
        tmp = x
    else if (z <= 2.4d+95) then
        tmp = x * ((y - a) / z)
    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 = y * ((t - x) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.4e+37) {
		tmp = t;
	} else if (z <= -2.2e-126) {
		tmp = t_2;
	} else if (z <= -3.7e-271) {
		tmp = t_1;
	} else if (z <= 1.7e-229) {
		tmp = t_2;
	} else if (z <= 1.5e-54) {
		tmp = t_1;
	} else if (z <= 5.8e-30) {
		tmp = x;
	} else if (z <= 2.4e+95) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.4e+37:
		tmp = t
	elif z <= -2.2e-126:
		tmp = t_2
	elif z <= -3.7e-271:
		tmp = t_1
	elif z <= 1.7e-229:
		tmp = t_2
	elif z <= 1.5e-54:
		tmp = t_1
	elif z <= 5.8e-30:
		tmp = x
	elif z <= 2.4e+95:
		tmp = x * ((y - a) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.4e+37)
		tmp = t;
	elseif (z <= -2.2e-126)
		tmp = t_2;
	elseif (z <= -3.7e-271)
		tmp = t_1;
	elseif (z <= 1.7e-229)
		tmp = t_2;
	elseif (z <= 1.5e-54)
		tmp = t_1;
	elseif (z <= 5.8e-30)
		tmp = x;
	elseif (z <= 2.4e+95)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.4e+37)
		tmp = t;
	elseif (z <= -2.2e-126)
		tmp = t_2;
	elseif (z <= -3.7e-271)
		tmp = t_1;
	elseif (z <= 1.7e-229)
		tmp = t_2;
	elseif (z <= 1.5e-54)
		tmp = t_1;
	elseif (z <= 5.8e-30)
		tmp = x;
	elseif (z <= 2.4e+95)
		tmp = x * ((y - a) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+37], t, If[LessEqual[z, -2.2e-126], t$95$2, If[LessEqual[z, -3.7e-271], t$95$1, If[LessEqual[z, 1.7e-229], t$95$2, If[LessEqual[z, 1.5e-54], t$95$1, If[LessEqual[z, 5.8e-30], x, If[LessEqual[z, 2.4e+95], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-229}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-30}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.4e37 or 2.4e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -2.4e37 < z < -2.20000000000000014e-126 or -3.70000000000000022e-271 < z < 1.7e-229

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000014e-126 < z < -3.70000000000000022e-271 or 1.7e-229 < z < 1.50000000000000005e-54

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative56.8%

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

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

    if 1.50000000000000005e-54 < z < 5.79999999999999978e-30

    1. Initial program 99.6%

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

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

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

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

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

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

    if 5.79999999999999978e-30 < z < 2.4e95

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 43.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-229}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -7.5e+34)
     t
     (if (<= z -2.6e-126)
       t_2
       (if (<= z -3e-271)
         t_1
         (if (<= z 6.4e-229)
           t_2
           (if (<= z 4.5e-56)
             t_1
             (if (<= z 3.15e-28)
               x
               (if (<= z 2.7e+95) (* (- y a) (/ x z)) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7.5e+34) {
		tmp = t;
	} else if (z <= -2.6e-126) {
		tmp = t_2;
	} else if (z <= -3e-271) {
		tmp = t_1;
	} else if (z <= 6.4e-229) {
		tmp = t_2;
	} else if (z <= 4.5e-56) {
		tmp = t_1;
	} else if (z <= 3.15e-28) {
		tmp = x;
	} else if (z <= 2.7e+95) {
		tmp = (y - a) * (x / z);
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-7.5d+34)) then
        tmp = t
    else if (z <= (-2.6d-126)) then
        tmp = t_2
    else if (z <= (-3d-271)) then
        tmp = t_1
    else if (z <= 6.4d-229) then
        tmp = t_2
    else if (z <= 4.5d-56) then
        tmp = t_1
    else if (z <= 3.15d-28) then
        tmp = x
    else if (z <= 2.7d+95) then
        tmp = (y - a) * (x / z)
    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 = y * ((t - x) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7.5e+34) {
		tmp = t;
	} else if (z <= -2.6e-126) {
		tmp = t_2;
	} else if (z <= -3e-271) {
		tmp = t_1;
	} else if (z <= 6.4e-229) {
		tmp = t_2;
	} else if (z <= 4.5e-56) {
		tmp = t_1;
	} else if (z <= 3.15e-28) {
		tmp = x;
	} else if (z <= 2.7e+95) {
		tmp = (y - a) * (x / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -7.5e+34:
		tmp = t
	elif z <= -2.6e-126:
		tmp = t_2
	elif z <= -3e-271:
		tmp = t_1
	elif z <= 6.4e-229:
		tmp = t_2
	elif z <= 4.5e-56:
		tmp = t_1
	elif z <= 3.15e-28:
		tmp = x
	elif z <= 2.7e+95:
		tmp = (y - a) * (x / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -7.5e+34)
		tmp = t;
	elseif (z <= -2.6e-126)
		tmp = t_2;
	elseif (z <= -3e-271)
		tmp = t_1;
	elseif (z <= 6.4e-229)
		tmp = t_2;
	elseif (z <= 4.5e-56)
		tmp = t_1;
	elseif (z <= 3.15e-28)
		tmp = x;
	elseif (z <= 2.7e+95)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -7.5e+34)
		tmp = t;
	elseif (z <= -2.6e-126)
		tmp = t_2;
	elseif (z <= -3e-271)
		tmp = t_1;
	elseif (z <= 6.4e-229)
		tmp = t_2;
	elseif (z <= 4.5e-56)
		tmp = t_1;
	elseif (z <= 3.15e-28)
		tmp = x;
	elseif (z <= 2.7e+95)
		tmp = (y - a) * (x / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+34], t, If[LessEqual[z, -2.6e-126], t$95$2, If[LessEqual[z, -3e-271], t$95$1, If[LessEqual[z, 6.4e-229], t$95$2, If[LessEqual[z, 4.5e-56], t$95$1, If[LessEqual[z, 3.15e-28], x, If[LessEqual[z, 2.7e+95], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-229}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.15 \cdot 10^{-28}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.49999999999999976e34 or 2.7e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -7.49999999999999976e34 < z < -2.59999999999999999e-126 or -3.00000000000000002e-271 < z < 6.4000000000000003e-229

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999999e-126 < z < -3.00000000000000002e-271 or 6.4000000000000003e-229 < z < 4.5000000000000001e-56

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative56.8%

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

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

    if 4.5000000000000001e-56 < z < 3.1499999999999999e-28

    1. Initial program 99.6%

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

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

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

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

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

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

    if 3.1499999999999999e-28 < z < 2.7e95

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified45.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      3. associate-/r/45.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-56}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 46.5% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-20}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.9999999999999996e30 or 2.5999999999999999e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -9.9999999999999996e30 < z < 9.9999999999999995e-127

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999995e-127 < z < 7.20000000000000016e-63

    1. Initial program 99.7%

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

        \[\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 y around -inf 80.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    10. Simplified62.7%

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

    if 7.20000000000000016e-63 < z < 1.79999999999999987e-20

    1. Initial program 99.6%

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

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

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

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

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

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

    if 1.79999999999999987e-20 < z < 2.5999999999999999e95

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+31}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 68.0% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.25000000000000009e44 or 2.2499999999999999e-26 < z

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
    7. Simplified74.9%

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

    if -3.25000000000000009e44 < z < -3.6999999999999999e-59

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

    if -3.6999999999999999e-59 < z < -3.5e-126

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{t - x}}} \]
      5. associate-/r/86.6%

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

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

    if -3.5e-126 < z < 2.2499999999999999e-26

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+44}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-126}:\\ \;\;\;\;x + \frac{z}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 9: 67.8% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.3500000000000001e46 or 5.99999999999999985e-19 < z

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{z} \cdot \left(t - x\right)} \]
    7. Simplified74.9%

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

    if -1.3500000000000001e46 < z < -2.40000000000000009e-60

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

    if -2.40000000000000009e-60 < z < -3.5e-126

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{t - x}}} \]
      5. associate-/r/86.6%

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

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

    if -3.5e-126 < z < 5.99999999999999985e-19

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+46}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-60}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-126}:\\ \;\;\;\;x + \frac{z}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 10: 46.1% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-19}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.2000000000000003e36 or 2.7e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -5.2000000000000003e36 < z < 1.0499999999999999e-126

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0499999999999999e-126 < z < 8.00000000000000053e-63

    1. Initial program 99.7%

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

        \[\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 y around -inf 80.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    10. Simplified62.7%

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

    if 8.00000000000000053e-63 < z < 9.00000000000000026e-19

    1. Initial program 99.6%

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

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

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

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

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

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

    if 9.00000000000000026e-19 < z < 2.7e95

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified45.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      2. associate-/r/42.1%

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

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-63}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 59.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -7 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.0000000000000006e-61 or 4.2000000000000001e33 < z

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

    if -7.0000000000000006e-61 < z < 1.35000000000000003e-24

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000003e-24 < z < 4.2000000000000001e33

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-61}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+33}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 12: 59.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.16 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-159}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.16e-57)
     t_1
     (if (<= z 7.2e-159)
       (+ x (/ y (/ a t)))
       (if (<= z 1.3e+39) (* y (/ (- t x) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.16e-57) {
		tmp = t_1;
	} else if (z <= 7.2e-159) {
		tmp = x + (y / (a / t));
	} else if (z <= 1.3e+39) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-1.16d-57)) then
        tmp = t_1
    else if (z <= 7.2d-159) then
        tmp = x + (y / (a / t))
    else if (z <= 1.3d+39) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.16e-57) {
		tmp = t_1;
	} else if (z <= 7.2e-159) {
		tmp = x + (y / (a / t));
	} else if (z <= 1.3e+39) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.16e-57:
		tmp = t_1
	elif z <= 7.2e-159:
		tmp = x + (y / (a / t))
	elif z <= 1.3e+39:
		tmp = y * ((t - x) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.16e-57)
		tmp = t_1;
	elseif (z <= 7.2e-159)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= 1.3e+39)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.16e-57)
		tmp = t_1;
	elseif (z <= 7.2e-159)
		tmp = x + (y / (a / t));
	elseif (z <= 1.3e+39)
		tmp = y * ((t - x) / (a - z));
	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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e-57], t$95$1, If[LessEqual[z, 7.2e-159], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+39], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15999999999999996e-57 or 1.3e39 < z

    1. Initial program 47.3%

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

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

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

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

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

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

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

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

    if -1.15999999999999996e-57 < z < 7.20000000000000042e-159

    1. Initial program 94.1%

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

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

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

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

      \[\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*87.1%

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

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

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

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

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

    if 7.20000000000000042e-159 < z < 1.3e39

    1. Initial program 87.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative66.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{-57}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-159}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 13: 66.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.35e-57)
     t_1
     (if (<= z 3.4e-27)
       (+ x (/ y (/ a (- t x))))
       (if (<= z 1.95e+30) (* y (/ (- t x) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.35e-57) {
		tmp = t_1;
	} else if (z <= 3.4e-27) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 1.95e+30) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-1.35d-57)) then
        tmp = t_1
    else if (z <= 3.4d-27) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 1.95d+30) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.35e-57) {
		tmp = t_1;
	} else if (z <= 3.4e-27) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 1.95e+30) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.35e-57:
		tmp = t_1
	elif z <= 3.4e-27:
		tmp = x + (y / (a / (t - x)))
	elif z <= 1.95e+30:
		tmp = y * ((t - x) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.35e-57)
		tmp = t_1;
	elseif (z <= 3.4e-27)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 1.95e+30)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.35e-57)
		tmp = t_1;
	elseif (z <= 3.4e-27)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 1.95e+30)
		tmp = y * ((t - x) / (a - z));
	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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-57], t$95$1, If[LessEqual[z, 3.4e-27], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+30], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3500000000000001e-57 or 1.95000000000000005e30 < z

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

    if -1.3500000000000001e-57 < z < 3.3999999999999997e-27

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

    if 3.3999999999999997e-27 < z < 1.95000000000000005e30

    1. Initial program 75.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative76.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 14: 71.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+37} \lor \neg \left(z \leq 4.1 \cdot 10^{-19}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.79999999999999999e37 or 4.09999999999999985e-19 < z

    1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999999e37 < z < 4.09999999999999985e-19

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

Alternative 15: 76.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+35} \lor \neg \left(z \leq 1.02 \cdot 10^{-18}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.80000000000000029e35 or 1.02e-18 < z

    1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000029e35 < z < 1.02e-18

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

Alternative 16: 79.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.50000000000000025e30 or 2.5e-15 < z

    1. Initial program 41.5%

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

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

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

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

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

      \[\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. +-commutative62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000025e30 < z < 2.5e-15

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

Alternative 17: 54.8% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000001e33 or 2.04999999999999993e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e33 < z < 6.49999999999999987e-21

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999987e-21 < z < 2.04999999999999993e95

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+33}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 18: 51.1% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e37 or 1.9e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -2.4e37 < z < 1.02e-18

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.02e-18 < z < 1.9e95

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified45.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      3. associate-/r/45.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-18}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+95}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 19: 51.7% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e37 or 3.2000000000000001e95 < z

    1. Initial program 36.0%

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

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

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

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

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

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

    if -2.4e37 < z < 7.1999999999999998e-25

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999998e-25 < z < 3.2000000000000001e95

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 69.6% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2e30 or 3.6000000000000001e-19 < z

    1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2e30 < z < 3.6000000000000001e-19

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

Alternative 21: 36.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-104}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.0000000000000002e110 or 3.5e9 < a

    1. Initial program 76.1%

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

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

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

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

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

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

    if -8.0000000000000002e110 < a < -5.4999999999999998e-104

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

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

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

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

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

    if -5.4999999999999998e-104 < a < 3.5e9

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
      2. associate-/r/38.0%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    10. Simplified38.0%

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

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

Alternative 22: 34.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.16:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.160000000000000003 or 1.9500000000000002e-30 < z

    1. Initial program 46.3%

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

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

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

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

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

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

    if -0.160000000000000003 < z < 1.9500000000000002e-30

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    10. Simplified34.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    11. Taylor expanded in y around 0 34.1%

      \[\leadsto \color{blue}{\frac{y \cdot t}{a}} \]
    12. Step-by-step derivation
      1. *-commutative34.1%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    13. Simplified34.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.16:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 23: 38.2% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+107}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.0000000000000002e110 or 1.50000000000000012e107 < a

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

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

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

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

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

    if -8.0000000000000002e110 < a < 1.50000000000000012e107

    1. Initial program 65.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+107}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 24.7% 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.6%

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

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

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

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

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

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

    \[\leadsto t \]

Developer target: 84.1% 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 2023224 
(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))))