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

Percentage Accurate: 67.7% → 90.7%
Time: 13.3s
Alternatives: 17
Speedup: 0.7×

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 17 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.7% 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: 90.7% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot a + z \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))) < -5.0000000000000002e-298 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 68.2%

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

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

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

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

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

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

    1. Initial program 4.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf 99.8%

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

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

Alternative 2: 86.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-298}:\\
\;\;\;\;t\_2\\

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

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


\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))) < -inf.0 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 59.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 71.3%

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000002e-298

    1. Initial program 92.2%

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

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

    1. Initial program 4.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf 99.8%

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

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

Alternative 3: 75.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-12} \lor \neg \left(a \leq -8 \cdot 10^{-56}\right) \land \left(a \leq -1.85 \cdot 10^{-128} \lor \neg \left(a \leq 3.55 \cdot 10^{-22}\right)\right):\\
\;\;\;\;x - y \cdot \frac{z - t}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.04999999999999997e-12 or -8.0000000000000003e-56 < a < -1.85e-128 or 3.5499999999999999e-22 < a

    1. Initial program 67.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 67.5%

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

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

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

    if -1.04999999999999997e-12 < a < -8.0000000000000003e-56 or -1.85e-128 < a < 3.5499999999999999e-22

    1. Initial program 60.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf 78.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-12} \lor \neg \left(a \leq -8 \cdot 10^{-56}\right) \land \left(a \leq -1.85 \cdot 10^{-128} \lor \neg \left(a \leq 3.55 \cdot 10^{-22}\right)\right):\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+126} \lor \neg \left(x \leq 1.36 \cdot 10^{-36} \lor \neg \left(x \leq 40000\right) \land x \leq 1.02 \cdot 10^{+152}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.24999999999999994e126 or 1.36000000000000007e-36 < x < 4e4 or 1.01999999999999999e152 < x

    1. Initial program 56.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 64.2%

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

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

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

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

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

    if -1.24999999999999994e126 < x < 1.36000000000000007e-36 or 4e4 < x < 1.01999999999999999e152

    1. Initial program 68.6%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr88.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+126} \lor \neg \left(x \leq 1.36 \cdot 10^{-36} \lor \neg \left(x \leq 40000\right) \land x \leq 1.02 \cdot 10^{+152}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 1.56 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.2500000000000001e-13 or 3.9999999999999997e112 < t

    1. Initial program 34.9%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr72.8%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t}{a - t}\right)} \]
      2. distribute-neg-frac260.4%

        \[\leadsto y \cdot \color{blue}{\frac{t}{-\left(a - t\right)}} \]
      3. neg-sub060.4%

        \[\leadsto y \cdot \frac{t}{\color{blue}{0 - \left(a - t\right)}} \]
      4. associate--r-60.4%

        \[\leadsto y \cdot \frac{t}{\color{blue}{\left(0 - a\right) + t}} \]
      5. neg-sub060.4%

        \[\leadsto y \cdot \frac{t}{\color{blue}{\left(-a\right)} + t} \]
    10. Simplified60.4%

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

    if -4.2500000000000001e-13 < t < 1.5599999999999999e-236 or 2.30000000000000007e-200 < t < 3.9999999999999997e112

    1. Initial program 85.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 62.3%

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

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

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

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

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

    if 1.5599999999999999e-236 < t < 2.30000000000000007e-200

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    10. Simplified90.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.25 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 1.56 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-200}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1000000000000001e72 or 3.9999999999999997e112 < t

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e72 < t < 5.59999999999999995e-237 or 5.99999999999999989e-200 < t < 3.9999999999999997e112

    1. Initial program 83.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 60.3%

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

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

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

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

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

    if 5.59999999999999995e-237 < t < 5.99999999999999989e-200

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    10. Simplified90.1%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 51.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.80000000000000006e72 or 3.9999999999999997e112 < t

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.80000000000000006e72 < t < 5.59999999999999995e-237 or 3.8e-200 < t < 3.9999999999999997e112

    1. Initial program 83.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 60.3%

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

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

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

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

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

    if 5.59999999999999995e-237 < t < 3.8e-200

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    10. Simplified90.1%

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 48.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 1.56 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.55000000000000011e74 or 4.3999999999999999e112 < t

    1. Initial program 29.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 55.7%

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

    if -1.55000000000000011e74 < t < 1.5599999999999999e-236 or 6.8000000000000006e-200 < t < 4.3999999999999999e112

    1. Initial program 83.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 60.3%

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

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

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

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

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

    if 1.5599999999999999e-236 < t < 6.8000000000000006e-200

    1. Initial program 91.2%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
    10. Simplified90.1%

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 76.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.5000000000000004e158 or 5.8000000000000004e112 < t

    1. Initial program 27.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf 63.4%

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

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

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

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

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

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

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

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

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

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

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

    if -7.5000000000000004e158 < t < -7.5000000000000003e-28

    1. Initial program 52.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 58.0%

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

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

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

    if -7.5000000000000003e-28 < t < 5.8000000000000004e112

    1. Initial program 86.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+158}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-28}:\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+112}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -8.8 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{+91}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \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 (<= t -8.8e-13)
     t_1
     (if (<= t 1.25e-236)
       (* x (- 1.0 (/ z a)))
       (if (<= t 5.9e+91) (* z (/ (- x y) (- t a))) 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 (t <= -8.8e-13) {
		tmp = t_1;
	} else if (t <= 1.25e-236) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.9e+91) {
		tmp = z * ((x - y) / (t - a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    if (t <= (-8.8d-13)) then
        tmp = t_1
    else if (t <= 1.25d-236) then
        tmp = x * (1.0d0 - (z / a))
    else if (t <= 5.9d+91) then
        tmp = z * ((x - y) / (t - a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -8.8e-13) {
		tmp = t_1;
	} else if (t <= 1.25e-236) {
		tmp = x * (1.0 - (z / a));
	} else if (t <= 5.9e+91) {
		tmp = z * ((x - y) / (t - a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if t <= -8.8e-13:
		tmp = t_1
	elif t <= 1.25e-236:
		tmp = x * (1.0 - (z / a))
	elif t <= 5.9e+91:
		tmp = z * ((x - y) / (t - a))
	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 (t <= -8.8e-13)
		tmp = t_1;
	elseif (t <= 1.25e-236)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif (t <= 5.9e+91)
		tmp = Float64(z * Float64(Float64(x - y) / Float64(t - a)));
	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 (t <= -8.8e-13)
		tmp = t_1;
	elseif (t <= 1.25e-236)
		tmp = x * (1.0 - (z / a));
	elseif (t <= 5.9e+91)
		tmp = z * ((x - y) / (t - a));
	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[t, -8.8e-13], t$95$1, If[LessEqual[t, 1.25e-236], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.9e+91], N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.79999999999999986e-13 or 5.9000000000000002e91 < t

    1. Initial program 35.8%

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

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

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

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

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

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

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

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

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

    if -8.79999999999999986e-13 < t < 1.2499999999999999e-236

    1. Initial program 90.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 70.3%

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

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

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

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

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

    if 1.2499999999999999e-236 < t < 5.9000000000000002e91

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq 5.9 \cdot 10^{+91}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 38.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -2 \cdot 10^{-292}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e72 or 3.9999999999999997e112 < t

    1. Initial program 29.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 55.7%

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

    if -2.3e72 < t < -2.0000000000000001e-292 or 2.09999999999999984e-154 < t < 3.9999999999999997e112

    1. Initial program 80.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.5%

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

    if -2.0000000000000001e-292 < t < 2.09999999999999984e-154

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 12: 37.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.26 \cdot 10^{+73}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.56 \cdot 10^{-236}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-187}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+112}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.25999999999999993e73 or 5.50000000000000026e112 < t

    1. Initial program 29.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 55.7%

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

    if -1.25999999999999993e73 < t < 1.5599999999999999e-236 or 2.4999999999999998e-187 < t < 5.50000000000000026e112

    1. Initial program 83.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 41.6%

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

    if 1.5599999999999999e-236 < t < 2.4999999999999998e-187

    1. Initial program 92.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 46.8%

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 78.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6800000000000001e-15 or 1.1999999999999999e-13 < a

    1. Initial program 66.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.3%

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

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

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

    if -1.6800000000000001e-15 < a < 1.1999999999999999e-13

    1. Initial program 61.9%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.68 \cdot 10^{-15} \lor \neg \left(a \leq 1.2 \cdot 10^{-13}\right):\\ \;\;\;\;x - y \cdot \frac{z - t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z - a}{t} \cdot \left(x - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 69.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.25000000000000003e80 or 2.5000000000000001e-14 < a

    1. Initial program 66.2%

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

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

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

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

    if -2.25000000000000003e80 < a < 2.5000000000000001e-14

    1. Initial program 62.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around -inf 71.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{+80} \lor \neg \left(a \leq 2.5 \cdot 10^{-14}\right):\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 65.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.29999999999999997e-33 or 1.0500000000000001e23 < t

    1. Initial program 41.3%

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

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

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

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

        \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2}} \cdot \left(\sqrt[3]{y - x} \cdot \frac{z - t}{a - t}\right) \]
    4. Applied egg-rr75.0%

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

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

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

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

    if -1.29999999999999997e-33 < t < 1.0500000000000001e23

    1. Initial program 89.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-33} \lor \neg \left(t \leq 1.05 \cdot 10^{+23}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 38.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+73}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.84999999999999987e73 or 3.9999999999999997e112 < t

    1. Initial program 29.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 55.7%

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

    if -1.84999999999999987e73 < t < 3.9999999999999997e112

    1. Initial program 84.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 39.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 25.1% 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 64.4%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 28.4%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Developer target: 86.7% accurate, 0.5× 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 2024100 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (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))))