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

Percentage Accurate: 68.0% → 90.6%
Time: 12.6s
Alternatives: 16
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 68.0% 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.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 73.5%

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 50.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+102}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;x + t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.1e114 or 1.6e19 < z < 2.10000000000000001e102 or 3.4999999999999999e190 < z

    1. Initial program 36.3%

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

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

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

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

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

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

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

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

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

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

    if -3.1e114 < z < 1.6e19

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.10000000000000001e102 < z < 2.7999999999999998e139

    1. Initial program 25.7%

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

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

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

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

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

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

    if 2.7999999999999998e139 < z < 3.4999999999999999e190

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    9. Simplified43.0%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    12. Simplified43.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+114}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+102}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 3: 54.0% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 440000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3e114 or 4.4e8 < z

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

    if -3e114 < z < -1.00000000000000005e32

    1. Initial program 55.6%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y \cdot t}{a}\right)} - 1\right)} \]
      3. associate-/l*54.9%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{a}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr54.9%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def54.8%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)\right)} \]
      2. expm1-log1p62.1%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
      3. associate-/r/61.7%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot t} \]
      4. *-commutative61.7%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
      5. associate-*r/49.4%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
      7. associate-*r/62.1%

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

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

    if -1.00000000000000005e32 < z < -1.65e-22

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

    if -1.65e-22 < z < -1.1e-197

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e-197 < z < 4.4e8

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+114}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+32}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-22}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-197}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 440000000:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 4: 59.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -6.1 \cdot 10^{-193}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e83 or 8.9999999999999999e69 < a

    1. Initial program 75.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot t}{a}\right)\right)} \]
      2. expm1-udef64.7%

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y \cdot t}{a}\right)} - 1\right)} \]
      3. associate-/l*67.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{a}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr67.0%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def70.8%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)\right)} \]
      2. expm1-log1p77.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
      3. associate-/r/76.9%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot t} \]
      4. *-commutative76.9%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
      5. associate-*r/71.7%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
      7. associate-*r/77.9%

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

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

    if -1.4e83 < a < -6.10000000000000012e-193 or 8.2000000000000002e-151 < a < 8.9999999999999999e69

    1. Initial program 58.7%

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

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

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

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

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

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

    if -6.10000000000000012e-193 < a < 8.2000000000000002e-151

    1. Initial program 73.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+83}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -6.1 \cdot 10^{-193}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 5: 76.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+59}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+203}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \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.8e+154)
     t_1
     (if (<= z 1.95e+59)
       (+ x (* (- t x) (/ y (- a z))))
       (if (<= z 8.8e+203) (+ t (/ (* (- y a) (- x t)) z)) 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.8e+154) {
		tmp = t_1;
	} else if (z <= 1.95e+59) {
		tmp = x + ((t - x) * (y / (a - z)));
	} else if (z <= 8.8e+203) {
		tmp = t + (((y - a) * (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 / (t - x)))
    if (z <= (-1.8d+154)) then
        tmp = t_1
    else if (z <= 1.95d+59) then
        tmp = x + ((t - x) * (y / (a - z)))
    else if (z <= 8.8d+203) then
        tmp = t + (((y - a) * (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 / (t - x)));
	double tmp;
	if (z <= -1.8e+154) {
		tmp = t_1;
	} else if (z <= 1.95e+59) {
		tmp = x + ((t - x) * (y / (a - z)));
	} else if (z <= 8.8e+203) {
		tmp = t + (((y - a) * (x - t)) / z);
	} 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.8e+154:
		tmp = t_1
	elif z <= 1.95e+59:
		tmp = x + ((t - x) * (y / (a - z)))
	elif z <= 8.8e+203:
		tmp = t + (((y - a) * (x - t)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(y / Float64(z / Float64(t - x))))
	tmp = 0.0
	if (z <= -1.8e+154)
		tmp = t_1;
	elseif (z <= 1.95e+59)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z))));
	elseif (z <= 8.8e+203)
		tmp = Float64(t + Float64(Float64(Float64(y - a) * 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 / (t - x)));
	tmp = 0.0;
	if (z <= -1.8e+154)
		tmp = t_1;
	elseif (z <= 1.95e+59)
		tmp = x + ((t - x) * (y / (a - z)));
	elseif (z <= 8.8e+203)
		tmp = t + (((y - a) * (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[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+154], t$95$1, If[LessEqual[z, 1.95e+59], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+203], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8e154 or 8.80000000000000018e203 < z

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e154 < z < 1.95000000000000011e59

    1. Initial program 87.0%

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

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

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

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

    if 1.95000000000000011e59 < z < 8.80000000000000018e203

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+154}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+59}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+203}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \]

Alternative 6: 58.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-200}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-54}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \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 -4.3e+111)
     t_1
     (if (<= z -1.7e-200)
       (* x (- 1.0 (/ y a)))
       (if (<= z 5.8e-54) (+ x (* t (/ y a))) 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 <= -4.3e+111) {
		tmp = t_1;
	} else if (z <= -1.7e-200) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5.8e-54) {
		tmp = x + (t * (y / a));
	} 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 <= (-4.3d+111)) then
        tmp = t_1
    else if (z <= (-1.7d-200)) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 5.8d-54) then
        tmp = x + (t * (y / a))
    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 <= -4.3e+111) {
		tmp = t_1;
	} else if (z <= -1.7e-200) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5.8e-54) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -4.3e+111:
		tmp = t_1
	elif z <= -1.7e-200:
		tmp = x * (1.0 - (y / a))
	elif z <= 5.8e-54:
		tmp = x + (t * (y / a))
	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 <= -4.3e+111)
		tmp = t_1;
	elseif (z <= -1.7e-200)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 5.8e-54)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	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 <= -4.3e+111)
		tmp = t_1;
	elseif (z <= -1.7e-200)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 5.8e-54)
		tmp = x + (t * (y / a));
	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, -4.3e+111], t$95$1, If[LessEqual[z, -1.7e-200], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-54], N[(x + N[(t * N[(y / a), $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 -4.3 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.29999999999999993e111 or 5.80000000000000029e-54 < z

    1. Initial program 39.3%

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

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

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

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

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

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

    if -4.29999999999999993e111 < z < -1.7000000000000001e-200

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-200 < z < 5.80000000000000029e-54

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-200}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-54}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 7: 70.0% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


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

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

    if -2.69999999999999986e31 < a < 6.50000000000000011e-136

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000011e-136 < a < 4.5e44

    1. Initial program 53.0%

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

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

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

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

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

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

    if 4.5e44 < a

    1. Initial program 70.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-136}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 8: 76.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+156} \lor \neg \left(z \leq 1.7 \cdot 10^{+68}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.10000000000000002e156 or 1.70000000000000008e68 < z

    1. Initial program 25.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000002e156 < z < 1.70000000000000008e68

    1. Initial program 86.3%

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

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

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

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

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

Alternative 9: 53.9% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 90000000000:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.29999999999999993e111 or 9e10 < z

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

    if -4.29999999999999993e111 < z < -2.0000000000000001e-196

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-196 < z < 9e10

    1. Initial program 91.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot t}{a}\right)\right)} \]
      2. expm1-udef53.2%

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y \cdot t}{a}\right)} - 1\right)} \]
      3. associate-/l*54.0%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{a}{t}}}\right)} - 1\right) \]
    7. Applied egg-rr54.0%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def58.8%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{\frac{a}{t}}\right)\right)} \]
      2. expm1-log1p70.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
      3. associate-/r/73.1%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot t} \]
      4. *-commutative73.1%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
      5. associate-*r/68.6%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
      7. associate-*r/70.7%

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

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

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

Alternative 10: 54.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 86000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8999999999999999e112 or 8.6e10 < z

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

    if -6.8999999999999999e112 < z < -2.10000000000000012e-201

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000012e-201 < z < 8.6e10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

Alternative 11: 66.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+111} \lor \neg \left(z \leq 5.2 \cdot 10^{-54}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4000000000000005e111 or 5.20000000000000004e-54 < z

    1. Initial program 39.3%

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

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

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

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

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

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

    if -7.4000000000000005e111 < z < 5.20000000000000004e-54

    1. Initial program 89.1%

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

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

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

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

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

Alternative 12: 36.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-196}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+69}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.99999999999999961e80 or 3.39999999999999986e69 < a

    1. Initial program 75.5%

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

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

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

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

    if -4.99999999999999961e80 < a < -1.10000000000000007e-196

    1. Initial program 60.9%

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

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

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

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

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

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

    if -1.10000000000000007e-196 < a < 6.99999999999999991e-151

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    9. Simplified52.3%

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

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

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

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

    if 6.99999999999999991e-151 < a < 3.39999999999999986e69

    1. Initial program 55.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-196}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 37.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.99999999999999961e80 or 1.3000000000000001e69 < a

    1. Initial program 75.5%

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

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

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

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

    if -4.99999999999999961e80 < a < -8.0000000000000004e-196

    1. Initial program 60.9%

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

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

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

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

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

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

    if -8.0000000000000004e-196 < a < 9.4999999999999996e-151

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    9. Simplified52.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Step-by-step derivation
      1. associate-/r/54.1%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    11. Applied egg-rr54.1%

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

    if 9.4999999999999996e-151 < a < 1.3000000000000001e69

    1. Initial program 55.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 48.3% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.69999999999999983e154 or 8.0000000000000006e128 < z

    1. Initial program 23.0%

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

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

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

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

    if -4.69999999999999983e154 < z < 8.0000000000000006e128

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(1 - \frac{y}{a}\right)} \cdot x \]
      3. *-commutative54.8%

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

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

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

Alternative 15: 38.5% accurate, 2.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.3e15 or 9.4999999999999995e69 < a

    1. Initial program 76.5%

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

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

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

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

    if -1.3e15 < a < 9.4999999999999995e69

    1. Initial program 61.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 25.2% 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. associate-*l/85.3%

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

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

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

    \[\leadsto t \]

Developer target: 84.6% 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 2023199 
(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))))