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

Percentage Accurate: 67.4% → 89.8%
Time: 18.1s
Alternatives: 21
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 67.4% accurate, 1.0× speedup?

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

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

Alternative 1: 89.8% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 76.4%

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 73.9%

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

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

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

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

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

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

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

Alternative 2: 81.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+300}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* (- y x) (- t z)) (- a t)))))
   (if (<= t_1 (- INFINITY))
     (* y (/ (- z t) (- a t)))
     (if (<= t_1 -1e-262)
       t_1
       (if (<= t_1 0.0)
         (+ y (/ (* (- z a) (- x y)) t))
         (if (<= t_1 4e+300) t_1 (- x (/ (- t z) (/ (- a t) y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - x) * (t - z)) / (a - t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * ((z - t) / (a - t));
	} else if (t_1 <= -1e-262) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((z - a) * (x - y)) / t);
	} else if (t_1 <= 4e+300) {
		tmp = t_1;
	} else {
		tmp = x - ((t - z) / ((a - t) / y));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - x) * (t - z)) / (a - t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * ((z - t) / (a - t));
	} else if (t_1 <= -1e-262) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((z - a) * (x - y)) / t);
	} else if (t_1 <= 4e+300) {
		tmp = t_1;
	} else {
		tmp = x - ((t - z) / ((a - t) / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - x) * (t - z)) / (a - t))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * ((z - t) / (a - t))
	elif t_1 <= -1e-262:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = y + (((z - a) * (x - y)) / t)
	elif t_1 <= 4e+300:
		tmp = t_1
	else:
		tmp = x - ((t - z) / ((a - t) / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (t_1 <= -1e-262)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t));
	elseif (t_1 <= 4e+300)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(Float64(t - z) / Float64(Float64(a - t) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((y - x) * (t - z)) / (a - t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * ((z - t) / (a - t));
	elseif (t_1 <= -1e-262)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = y + (((z - a) * (x - y)) / t);
	elseif (t_1 <= 4e+300)
		tmp = t_1;
	else
		tmp = x - ((t - z) / ((a - t) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-262], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+300], t$95$1, N[(x - N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-262}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+300}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0

    1. Initial program 37.9%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.00000000000000001e-262 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.0000000000000002e300

    1. Initial program 97.3%

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.7%

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

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

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

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

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

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

Alternative 3: 89.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 75.2%

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 51.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-102}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 10^{+81}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.39999999999999992e-55 or 5.5000000000000003e-67 < a < 5e51 or 9.99999999999999921e80 < a

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

    if -1.39999999999999992e-55 < a < 1.3e-130

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z - t}{\color{blue}{-1 \cdot \frac{t}{y}}} \]
    10. Step-by-step derivation
      1. mul-1-neg63.9%

        \[\leadsto \frac{z - t}{\color{blue}{-\frac{t}{y}}} \]
      2. distribute-neg-frac63.9%

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

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

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

        \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
      2. mul-1-neg62.8%

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

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

        \[\leadsto y + \left(-\color{blue}{z \cdot \frac{y}{t}}\right) \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{y - z \cdot \frac{y}{t}} \]
    14. Simplified66.1%

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

    if 1.3e-130 < a < 1.35e-102 or 5e51 < a < 9.99999999999999921e80

    1. Initial program 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35e-102 < a < 3.89999999999999978e-89

    1. Initial program 100.0%

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

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

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

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

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

    if 3.89999999999999978e-89 < a < 5.5000000000000003e-67

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-130}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-67}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 10^{+81}\right):\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \end{array} \]

Alternative 5: 61.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -0.26:\\
\;\;\;\;t_2\\

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

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

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

\mathbf{elif}\;a \leq 5.1 \cdot 10^{+75}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.80000000000000015e54 or -9.20000000000000047e39 < a < -0.26000000000000001 or 5.10000000000000037e75 < a

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

    if -2.80000000000000015e54 < a < -9.20000000000000047e39 or -9.99999999999999927e-105 < a < 1.3e-130 or 2.4999999999999998e-72 < a < 5.10000000000000037e75

    1. Initial program 64.4%

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

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

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

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

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

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

    if -0.26000000000000001 < a < -9.99999999999999927e-105

    1. Initial program 76.7%

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

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

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

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

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

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

    if 1.3e-130 < a < 2.4999999999999998e-72

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+54}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq -0.26:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-104}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-130}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{+75}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 6: 38.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ t_2 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{+230}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{+163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+220}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))) (t_2 (* y (/ z (- a t)))))
   (if (<= y -2.4e+230)
     y
     (if (<= y -1.25e+163)
       t_2
       (if (<= y -6e+64)
         y
         (if (<= y 1.8e-235)
           t_1
           (if (<= y 1.7e-163)
             (* x (/ z t))
             (if (<= y 7e-24) t_1 (if (<= y 9e+220) t_2 y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (y <= -2.4e+230) {
		tmp = y;
	} else if (y <= -1.25e+163) {
		tmp = t_2;
	} else if (y <= -6e+64) {
		tmp = y;
	} else if (y <= 1.8e-235) {
		tmp = t_1;
	} else if (y <= 1.7e-163) {
		tmp = x * (z / t);
	} else if (y <= 7e-24) {
		tmp = t_1;
	} else if (y <= 9e+220) {
		tmp = t_2;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (z / a))
    t_2 = y * (z / (a - t))
    if (y <= (-2.4d+230)) then
        tmp = y
    else if (y <= (-1.25d+163)) then
        tmp = t_2
    else if (y <= (-6d+64)) then
        tmp = y
    else if (y <= 1.8d-235) then
        tmp = t_1
    else if (y <= 1.7d-163) then
        tmp = x * (z / t)
    else if (y <= 7d-24) then
        tmp = t_1
    else if (y <= 9d+220) then
        tmp = t_2
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * (z / (a - t));
	double tmp;
	if (y <= -2.4e+230) {
		tmp = y;
	} else if (y <= -1.25e+163) {
		tmp = t_2;
	} else if (y <= -6e+64) {
		tmp = y;
	} else if (y <= 1.8e-235) {
		tmp = t_1;
	} else if (y <= 1.7e-163) {
		tmp = x * (z / t);
	} else if (y <= 7e-24) {
		tmp = t_1;
	} else if (y <= 9e+220) {
		tmp = t_2;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	t_2 = y * (z / (a - t))
	tmp = 0
	if y <= -2.4e+230:
		tmp = y
	elif y <= -1.25e+163:
		tmp = t_2
	elif y <= -6e+64:
		tmp = y
	elif y <= 1.8e-235:
		tmp = t_1
	elif y <= 1.7e-163:
		tmp = x * (z / t)
	elif y <= 7e-24:
		tmp = t_1
	elif y <= 9e+220:
		tmp = t_2
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	t_2 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (y <= -2.4e+230)
		tmp = y;
	elseif (y <= -1.25e+163)
		tmp = t_2;
	elseif (y <= -6e+64)
		tmp = y;
	elseif (y <= 1.8e-235)
		tmp = t_1;
	elseif (y <= 1.7e-163)
		tmp = Float64(x * Float64(z / t));
	elseif (y <= 7e-24)
		tmp = t_1;
	elseif (y <= 9e+220)
		tmp = t_2;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	t_2 = y * (z / (a - t));
	tmp = 0.0;
	if (y <= -2.4e+230)
		tmp = y;
	elseif (y <= -1.25e+163)
		tmp = t_2;
	elseif (y <= -6e+64)
		tmp = y;
	elseif (y <= 1.8e-235)
		tmp = t_1;
	elseif (y <= 1.7e-163)
		tmp = x * (z / t);
	elseif (y <= 7e-24)
		tmp = t_1;
	elseif (y <= 9e+220)
		tmp = t_2;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+230], y, If[LessEqual[y, -1.25e+163], t$95$2, If[LessEqual[y, -6e+64], y, If[LessEqual[y, 1.8e-235], t$95$1, If[LessEqual[y, 1.7e-163], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-24], t$95$1, If[LessEqual[y, 9e+220], t$95$2, y]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.25 \cdot 10^{+163}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -6 \cdot 10^{+64}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{elif}\;y \leq 7 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+220}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.39999999999999998e230 or -1.25e163 < y < -6.0000000000000004e64 or 9.00000000000000022e220 < y

    1. Initial program 53.3%

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

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

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

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

    if -2.39999999999999998e230 < y < -1.25e163 or 6.9999999999999993e-24 < y < 9.00000000000000022e220

    1. Initial program 79.2%

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

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

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

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

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

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

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

    if -6.0000000000000004e64 < y < 1.79999999999999999e-235 or 1.70000000000000007e-163 < y < 6.9999999999999993e-24

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

    if 1.79999999999999999e-235 < y < 1.70000000000000007e-163

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    9. Applied egg-rr49.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+230}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{+163}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{+64}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+220}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 7: 64.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-41} \lor \neg \left(y \leq 3.1 \cdot 10^{-22}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.80000000000000007e64 or -1.4e33 < y < -5.1999999999999999e-41 or 3.10000000000000013e-22 < y

    1. Initial program 67.5%

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

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

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

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

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

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

    if -1.80000000000000007e64 < y < -1.4e33

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

    if -5.1999999999999999e-41 < y < 3.10000000000000013e-22

    1. Initial program 72.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-41} \lor \neg \left(y \leq 3.1 \cdot 10^{-22}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\ \end{array} \]

Alternative 8: 71.9% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -8.3999999999999994e-73

    1. Initial program 69.9%

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

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

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

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

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

    if -8.3999999999999994e-73 < a < 2.0000000000000001e-101

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-101 < a < 1.22e55

    1. Initial program 80.9%

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

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

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

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

    if 1.22e55 < a < 7.09999999999999988e80

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.09999999999999988e80 < a

    1. Initial program 78.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{-73}:\\ \;\;\;\;x - \frac{t - z}{\frac{a - t}{y}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-101}:\\ \;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{+55}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\ \end{array} \]

Alternative 9: 41.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{-104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-142}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33} \lor \neg \left(a \leq 2.7 \cdot 10^{+32}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.3499999999999999e-104 or 5.8000000000000002e-104 < a < 4.8e-33 or 2.70000000000000013e32 < a

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e-104 < a < 3.6e-142

    1. Initial program 64.6%

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

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

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

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

    if 3.6e-142 < a < 5.8000000000000002e-104

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    9. Applied egg-rr67.6%

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

    if 4.8e-33 < a < 2.70000000000000013e32

    1. Initial program 74.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    8. Simplified57.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-104}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-104}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-33} \lor \neg \left(a \leq 2.7 \cdot 10^{+32}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 10: 56.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+125}:\\
\;\;\;\;x - \frac{z}{\frac{a}{x}}\\

\mathbf{elif}\;x \leq -5 \cdot 10^{+38} \lor \neg \left(x \leq -1.1 \cdot 10^{-105}\right) \land x \leq 3 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.7999999999999998e125

    1. Initial program 63.5%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{a} + x} \]
    6. Step-by-step derivation
      1. +-commutative57.3%

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a}{x}}} \]
    7. Simplified71.3%

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

    if -6.7999999999999998e125 < x < -4.9999999999999997e38 or -1.10000000000000002e-105 < x < 3.0000000000000002e-44

    1. Initial program 71.0%

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

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

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

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

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

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

    if -4.9999999999999997e38 < x < -1.10000000000000002e-105 or 3.0000000000000002e-44 < x

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+125}:\\ \;\;\;\;x - \frac{z}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{+38} \lor \neg \left(x \leq -1.1 \cdot 10^{-105}\right) \land x \leq 3 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]

Alternative 11: 59.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 2.65 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 10^{-26}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9499999999999999e64 or 1e-26 < y

    1. Initial program 66.2%

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

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

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

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

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

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

    if -1.9499999999999999e64 < y < 2.6500000000000001e-235 or 1.7999999999999999e-163 < y < 1e-26

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

    if 2.6500000000000001e-235 < y < 1.7999999999999999e-163

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-235}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \mathbf{elif}\;y \leq 10^{-26}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 12: 60.1% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.8000000000000001e64 or 8.9999999999999995e-23 < y

    1. Initial program 66.2%

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

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

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

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

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

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

    if -3.8000000000000001e64 < y < 1e-236

    1. Initial program 73.0%

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

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

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

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

    if 1e-236 < y < 1.9e-163

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9e-163 < y < 8.9999999999999995e-23

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq 10^{-236}:\\ \;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\left(z - a\right) \cdot \frac{1}{t}\right)\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 13: 51.4% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 7.1 \cdot 10^{+80}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.39999999999999992e-55 or 3.9000000000000003e-142 < a < 5e51 or 7.09999999999999988e80 < a

    1. Initial program 74.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    8. Simplified61.4%

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

    if -1.39999999999999992e-55 < a < 3.9000000000000003e-142

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z - t}{\color{blue}{-\frac{t}{y}}} \]
      2. distribute-neg-frac64.1%

        \[\leadsto \frac{z - t}{\color{blue}{\frac{-t}{y}}} \]
    11. Simplified64.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t} + y} \]
    13. Step-by-step derivation
      1. +-commutative63.1%

        \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
      2. mul-1-neg63.1%

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

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

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

        \[\leadsto \color{blue}{y - z \cdot \frac{y}{t}} \]
    14. Simplified66.5%

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

    if 5e51 < a < 7.09999999999999988e80

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+51} \lor \neg \left(a \leq 7.1 \cdot 10^{+80}\right):\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z - a}{\frac{t}{x}}\\ \end{array} \]

Alternative 14: 45.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-142}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.6e-57 or 6.50000000000000012e-36 < a

    1. Initial program 70.7%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot z} \]
    7. Simplified59.3%

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

    if -4.6e-57 < a < 3.1e-142

    1. Initial program 65.6%

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

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

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

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

    if 3.1e-142 < a < 1.1e-103

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot x} \]
    9. Applied egg-rr67.6%

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

    if 1.1e-103 < a < 6.50000000000000012e-36

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{-57}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-103}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]

Alternative 15: 67.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+34} \lor \neg \left(t \leq 3 \cdot 10^{-70}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2000000000000002e34 or 3.0000000000000001e-70 < t

    1. Initial program 49.1%

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

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

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

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

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

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

    if -2.2000000000000002e34 < t < 3.0000000000000001e-70

    1. Initial program 90.7%

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

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

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

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

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

Alternative 16: 69.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.7e-44 or 3.70000000000000014e-118 < y

    1. Initial program 69.5%

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

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

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

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

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

    if -3.7e-44 < y < 3.70000000000000014e-118

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

Alternative 17: 36.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.06 \cdot 10^{+30}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.44999999999999996e-56 or 1.06e30 < a

    1. Initial program 70.4%

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

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

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

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

    if -1.44999999999999996e-56 < a < 3.9000000000000003e-142

    1. Initial program 65.6%

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

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

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

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

    if 3.9000000000000003e-142 < a < 1.06e30

    1. Initial program 79.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    8. Simplified39.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-56}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+30}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 45.8% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.19999999999999999e-57 or 3.6e-142 < a

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

    if -2.19999999999999999e-57 < a < 3.6e-142

    1. Initial program 65.6%

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.7%

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

Alternative 19: 51.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6e-57 or 3.9000000000000003e-142 < a

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

    if -1.6e-57 < a < 3.9000000000000003e-142

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z - t}{\color{blue}{-\frac{t}{y}}} \]
      2. distribute-neg-frac64.1%

        \[\leadsto \frac{z - t}{\color{blue}{\frac{-t}{y}}} \]
    11. Simplified64.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t} + y} \]
    13. Step-by-step derivation
      1. +-commutative63.1%

        \[\leadsto \color{blue}{y + -1 \cdot \frac{y \cdot z}{t}} \]
      2. mul-1-neg63.1%

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

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

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

        \[\leadsto \color{blue}{y - z \cdot \frac{y}{t}} \]
    14. Simplified66.5%

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

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

Alternative 20: 37.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1300000000:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.4e-55) x (if (<= a 1300000000.0) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.4e-55) {
		tmp = x;
	} else if (a <= 1300000000.0) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.4d-55)) then
        tmp = x
    else if (a <= 1300000000.0d0) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.4e-55) {
		tmp = x;
	} else if (a <= 1300000000.0) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.4e-55:
		tmp = x
	elif a <= 1300000000.0:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.4e-55)
		tmp = x;
	elseif (a <= 1300000000.0)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.4e-55)
		tmp = x;
	elseif (a <= 1300000000.0)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-55], x, If[LessEqual[a, 1300000000.0], y, x]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1300000000:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.39999999999999992e-55 or 1.3e9 < a

    1. Initial program 71.0%

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

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

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

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

    if -1.39999999999999992e-55 < a < 1.3e9

    1. Initial program 68.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1300000000:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 24.6% accurate, 13.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 69.9%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification29.1%

    \[\leadsto x \]

Developer target: 86.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

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