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

Percentage Accurate: 67.3% → 90.2%
Time: 17.1s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 67.3% 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.2% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.20000000000000012e-16 or 28 < x

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.20000000000000012e-16 < x < 28

    1. Initial program 84.1%

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-74} \lor \neg \left(x \leq 1.15 \cdot 10^{-35}\right):\\
\;\;\;\;x \cdot \left(\left(1 - \frac{t}{t - a}\right) + \left(y \cdot \frac{\frac{t - z}{x}}{t - a} + \frac{z}{t - a}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.99999999999999992e-74 or 1.1499999999999999e-35 < x

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999992e-74 < x < 1.1499999999999999e-35

    1. Initial program 86.7%

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

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

Alternative 3: 58.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.72 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 72.7%

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

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

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

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

    if -3.10000000000000011e24 < a < -7.4999999999999996e-145 or 2.19999999999999996e-253 < a < 1.72e75

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.4999999999999996e-145 < a < 2.19999999999999996e-253

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

    if 1.72e75 < a

    1. Initial program 80.3%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity83.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+24}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-253}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 1.72 \cdot 10^{+75}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 7.2 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1000000000000004e28 or 7.1999999999999998e73 < a

    1. Initial program 75.4%

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

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

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

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

    if -5.1000000000000004e28 < a < -7.2000000000000001e-145 or 1.95e-254 < a < 7.1999999999999998e73

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    10. Simplified63.5%

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

    if -7.2000000000000001e-145 < a < 1.95e-254

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+28}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-254}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+73}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.2000000000000004e29 or 8.99999999999999969e73 < a

    1. Initial program 75.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity86.3%

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

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

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

    if -9.2000000000000004e29 < a < -7.2000000000000001e-145 or 1.65000000000000008e-254 < a < 8.99999999999999969e73

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
    10. Simplified63.5%

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

    if -7.2000000000000001e-145 < a < 1.65000000000000008e-254

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{z \cdot y}{a}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-254}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+73}:\\ \;\;\;\;z \cdot \frac{x - y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.4999999999999999e34 or 9.4999999999999993e212 < t

    1. Initial program 40.7%

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

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

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

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

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

      \[\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+65.3%

        \[\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/65.3%

        \[\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/65.3%

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

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

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

        \[\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} \]
      7. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999999e34 < t < 5.5000000000000003e41

    1. Initial program 94.0%

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

    if 5.5000000000000003e41 < t < 9.4999999999999993e212

    1. Initial program 50.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity88.3%

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

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

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

Alternative 7: 75.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.8000000000000004e-35 or 1.19999999999999993e205 < t

    1. Initial program 46.0%

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

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

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

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

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

      \[\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+65.3%

        \[\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/65.3%

        \[\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/65.3%

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

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

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

        \[\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} \]
      7. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8000000000000004e-35 < t < 1.15e-25

    1. Initial program 95.7%

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

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

    if 1.15e-25 < t < 1.19999999999999993e205

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-35}:\\ \;\;\;\;y - \left(z - a\right) \cdot \frac{y - x}{t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{z \cdot \left(y - x\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+205}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y - \left(z - a\right) \cdot \frac{y - x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -3.3 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(y - x\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+212}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{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 -3.3e-34)
     t_1
     (if (<= t 4.6e-26)
       (+ x (/ (* z (- y x)) (- a t)))
       (if (<= t 1.25e+212) (+ x (* (- t z) (/ 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 <= -3.3e-34) {
		tmp = t_1;
	} else if (t <= 4.6e-26) {
		tmp = x + ((z * (y - x)) / (a - t));
	} else if (t <= 1.25e+212) {
		tmp = x + ((t - z) * (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 <= (-3.3d-34)) then
        tmp = t_1
    else if (t <= 4.6d-26) then
        tmp = x + ((z * (y - x)) / (a - t))
    else if (t <= 1.25d+212) then
        tmp = x + ((t - z) * (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 <= -3.3e-34) {
		tmp = t_1;
	} else if (t <= 4.6e-26) {
		tmp = x + ((z * (y - x)) / (a - t));
	} else if (t <= 1.25e+212) {
		tmp = x + ((t - z) * (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 <= -3.3e-34:
		tmp = t_1
	elif t <= 4.6e-26:
		tmp = x + ((z * (y - x)) / (a - t))
	elif t <= 1.25e+212:
		tmp = x + ((t - z) * (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 <= -3.3e-34)
		tmp = t_1;
	elseif (t <= 4.6e-26)
		tmp = Float64(x + Float64(Float64(z * Float64(y - x)) / Float64(a - t)));
	elseif (t <= 1.25e+212)
		tmp = Float64(x + Float64(Float64(t - z) * Float64(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 <= -3.3e-34)
		tmp = t_1;
	elseif (t <= 4.6e-26)
		tmp = x + ((z * (y - x)) / (a - t));
	elseif (t <= 1.25e+212)
		tmp = x + ((t - z) * (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, -3.3e-34], t$95$1, If[LessEqual[t, 4.6e-26], N[(x + N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+212], N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / 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 -3.3 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.29999999999999983e-34 or 1.24999999999999998e212 < t

    1. Initial program 46.0%

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

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

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

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

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

      \[\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+65.3%

        \[\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/65.3%

        \[\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/65.3%

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

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

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

        \[\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} \]
      7. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

    if -3.29999999999999983e-34 < t < 4.60000000000000018e-26

    1. Initial program 95.7%

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

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

    if 4.60000000000000018e-26 < t < 1.24999999999999998e212

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-34}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{z \cdot \left(y - x\right)}{a - t}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+212}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-25}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+205}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{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 -3.8e-34)
     t_1
     (if (<= t 5.5e-25)
       (+ x (* z (/ (- x y) (- t a))))
       (if (<= t 1.16e+205) (+ x (* (- t z) (/ 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 <= -3.8e-34) {
		tmp = t_1;
	} else if (t <= 5.5e-25) {
		tmp = x + (z * ((x - y) / (t - a)));
	} else if (t <= 1.16e+205) {
		tmp = x + ((t - z) * (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 <= (-3.8d-34)) then
        tmp = t_1
    else if (t <= 5.5d-25) then
        tmp = x + (z * ((x - y) / (t - a)))
    else if (t <= 1.16d+205) then
        tmp = x + ((t - z) * (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 <= -3.8e-34) {
		tmp = t_1;
	} else if (t <= 5.5e-25) {
		tmp = x + (z * ((x - y) / (t - a)));
	} else if (t <= 1.16e+205) {
		tmp = x + ((t - z) * (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 <= -3.8e-34:
		tmp = t_1
	elif t <= 5.5e-25:
		tmp = x + (z * ((x - y) / (t - a)))
	elif t <= 1.16e+205:
		tmp = x + ((t - z) * (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 <= -3.8e-34)
		tmp = t_1;
	elseif (t <= 5.5e-25)
		tmp = Float64(x + Float64(z * Float64(Float64(x - y) / Float64(t - a))));
	elseif (t <= 1.16e+205)
		tmp = Float64(x + Float64(Float64(t - z) * Float64(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 <= -3.8e-34)
		tmp = t_1;
	elseif (t <= 5.5e-25)
		tmp = x + (z * ((x - y) / (t - a)));
	elseif (t <= 1.16e+205)
		tmp = x + ((t - z) * (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, -3.8e-34], t$95$1, If[LessEqual[t, 5.5e-25], N[(x + N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e+205], N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / 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 -3.8 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8000000000000001e-34 or 1.16000000000000001e205 < t

    1. Initial program 46.0%

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

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

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

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

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

      \[\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+65.3%

        \[\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/65.3%

        \[\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/65.3%

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

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

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

        \[\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} \]
      7. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

    if -3.8000000000000001e-34 < t < 5.50000000000000004e-25

    1. Initial program 95.7%

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

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

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

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

    if 5.50000000000000004e-25 < t < 1.16000000000000001e205

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{-34}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-25}:\\ \;\;\;\;x + z \cdot \frac{x - y}{t - a}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+205}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.18000000000000008e113

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

    if -1.18000000000000008e113 < t < -5.49999999999999975e53

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999975e53 < t < 1.10000000000000004e23

    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 y around inf 71.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity71.0%

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

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

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

    if 1.10000000000000004e23 < t

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 41.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{a - t} \cdot y\\ \mathbf{if}\;z \leq -3.15 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+183}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ z (- a t)) y)))
   (if (<= z -3.15e-6)
     t_1
     (if (<= z 7e+101) (+ x y) (if (<= z 4.6e+183) t_1 (* x (/ (- z a) t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / (a - t)) * y;
	double tmp;
	if (z <= -3.15e-6) {
		tmp = t_1;
	} else if (z <= 7e+101) {
		tmp = x + y;
	} else if (z <= 4.6e+183) {
		tmp = t_1;
	} else {
		tmp = x * ((z - 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) :: t_1
    real(8) :: tmp
    t_1 = (z / (a - t)) * y
    if (z <= (-3.15d-6)) then
        tmp = t_1
    else if (z <= 7d+101) then
        tmp = x + y
    else if (z <= 4.6d+183) then
        tmp = t_1
    else
        tmp = x * ((z - a) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z / (a - t)) * y;
	double tmp;
	if (z <= -3.15e-6) {
		tmp = t_1;
	} else if (z <= 7e+101) {
		tmp = x + y;
	} else if (z <= 4.6e+183) {
		tmp = t_1;
	} else {
		tmp = x * ((z - a) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z / (a - t)) * y
	tmp = 0
	if z <= -3.15e-6:
		tmp = t_1
	elif z <= 7e+101:
		tmp = x + y
	elif z <= 4.6e+183:
		tmp = t_1
	else:
		tmp = x * ((z - a) / t)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z / Float64(a - t)) * y)
	tmp = 0.0
	if (z <= -3.15e-6)
		tmp = t_1;
	elseif (z <= 7e+101)
		tmp = Float64(x + y);
	elseif (z <= 4.6e+183)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(z - a) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z / (a - t)) * y;
	tmp = 0.0;
	if (z <= -3.15e-6)
		tmp = t_1;
	elseif (z <= 7e+101)
		tmp = x + y;
	elseif (z <= 4.6e+183)
		tmp = t_1;
	else
		tmp = x * ((z - a) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -3.15e-6], t$95$1, If[LessEqual[z, 7e+101], N[(x + y), $MachinePrecision], If[LessEqual[z, 4.6e+183], t$95$1, N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.14999999999999991e-6 or 7.00000000000000046e101 < z < 4.5999999999999996e183

    1. Initial program 73.6%

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

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

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

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

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

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

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

    if -3.14999999999999991e-6 < z < 7.00000000000000046e101

    1. Initial program 73.5%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity68.8%

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

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

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

    if 4.5999999999999996e183 < z

    1. Initial program 64.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 39.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+39.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/39.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/39.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-neg39.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. div-sub45.4%

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

        \[\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} \]
      7. distribute-lft-out--45.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.15 \cdot 10^{-6}:\\ \;\;\;\;\frac{z}{a - t} \cdot y\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+183}:\\ \;\;\;\;\frac{z}{a - t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 74.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-34} \lor \neg \left(t \leq 10^{+119}\right):\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5999999999999999e-34 or 9.99999999999999944e118 < t

    1. Initial program 44.7%

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

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

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

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

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

      \[\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+64.7%

        \[\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/64.7%

        \[\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/64.7%

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

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

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

        \[\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} \]
      7. distribute-lft-out--64.7%

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e-34 < t < 9.99999999999999944e118

    1. Initial program 90.7%

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

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

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

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

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

Alternative 13: 67.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+22} \lor \neg \left(a \leq 1.65 \cdot 10^{-96}\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 -1.35e+22) (not (<= a 1.65e-96)))
   (+ 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 <= -1.35e+22) || !(a <= 1.65e-96)) {
		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 <= (-1.35d+22)) .or. (.not. (a <= 1.65d-96))) 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 <= -1.35e+22) || !(a <= 1.65e-96)) {
		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 <= -1.35e+22) or not (a <= 1.65e-96):
		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 <= -1.35e+22) || !(a <= 1.65e-96))
		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 <= -1.35e+22) || ~((a <= 1.65e-96)))
		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, -1.35e+22], N[Not[LessEqual[a, 1.65e-96]], $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 -1.35 \cdot 10^{+22} \lor \neg \left(a \leq 1.65 \cdot 10^{-96}\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 < -1.3500000000000001e22 or 1.64999999999999995e-96 < a

    1. Initial program 76.3%

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

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

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

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

    if -1.3500000000000001e22 < a < 1.64999999999999995e-96

    1. Initial program 68.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 75.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+75.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/75.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/75.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-neg75.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. div-sub76.1%

        \[\leadsto y + \color{blue}{\frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - \left(-a \cdot \left(y - x\right)\right)}{t}} \]
      6. mul-1-neg76.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} \]
      7. distribute-lft-out--76.1%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 39.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-38}:\\
\;\;\;\;y\\

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+173}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.10000000000000017e110 or 1.6000000000000001e173 < a

    1. Initial program 78.3%

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

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

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

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

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

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

    if -3.10000000000000017e110 < a < 1.05000000000000006e-38

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05000000000000006e-38 < a < 1.6000000000000001e173

    1. Initial program 73.3%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity78.1%

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

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

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

Alternative 15: 52.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-76} \lor \neg \left(t \leq 1.02 \cdot 10^{+24}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.1999999999999999e-76 or 1.02000000000000004e24 < t

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999999e-76 < t < 1.02000000000000004e24

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity72.3%

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

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

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

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

Alternative 16: 49.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+65}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.49999999999999998e84

    1. Initial program 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999998e84 < t < 5.4999999999999996e65

    1. Initial program 91.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity71.4%

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

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

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

    if 5.4999999999999996e65 < t

    1. Initial program 37.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity63.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+84}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+65}:\\ \;\;\;\;x + \frac{z \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 37.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+200}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{t} \]
      4. distribute-rgt-neg-in53.1%

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

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

    if -3.24999999999999999e212 < z < 2.79999999999999985e200

    1. Initial program 72.2%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity67.8%

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

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

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

    if 2.79999999999999985e200 < z

    1. Initial program 67.9%

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

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

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

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

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

      \[\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+41.8%

        \[\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/41.8%

        \[\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/41.8%

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

        \[\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. div-sub48.4%

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

        \[\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} \]
      7. distribute-lft-out--48.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z - a}{t}} \]
    10. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+212}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+200}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+123} \lor \neg \left(z \leq 5.2 \cdot 10^{+101}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.19999999999999962e123 or 5.2e101 < z

    1. Initial program 73.7%

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

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

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

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

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

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

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

    if -9.19999999999999962e123 < z < 5.2e101

    1. Initial program 72.6%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity67.8%

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

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

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

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

Alternative 19: 37.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+101}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{t} \]
      4. distribute-rgt-neg-in53.1%

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

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

    if -1.9999999999999999e214 < z < 4.6000000000000003e101

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

    if 4.6000000000000003e101 < z

    1. Initial program 67.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+214}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+101}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 38.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+104}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.79999999999999987e110 or 2.8999999999999998e104 < a

    1. Initial program 76.9%

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

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

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

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

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

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

    if -2.79999999999999987e110 < a < 2.8999999999999998e104

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer Target 1: 86.4% 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 2024165 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

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