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

Percentage Accurate: 68.2% → 88.5%
Time: 18.7s
Alternatives: 20
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 68.2% accurate, 1.0× speedup?

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

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

Alternative 1: 88.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15000000000000007e82 or 5.3999999999999999e81 < z

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.15000000000000007e82 < z < 5.3999999999999999e81

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.0%

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -0.001633:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.2000000000000001e158

    1. Initial program 64.8%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified88.4%

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

    if -2.2000000000000001e158 < a < -9.50000000000000097e108 or -0.0016329999999999999 < a < -1.1e-298

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000097e108 < a < -0.0016329999999999999

    1. Initial program 72.8%

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

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

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

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

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

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

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

    if -1.1e-298 < a < 8.1999999999999998e108

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num75.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr74.5%

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

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

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

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

    if 8.1999999999999998e108 < a

    1. Initial program 68.9%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. *-commutative61.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+158}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -0.001633:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-298}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+108}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 59.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -0.001633:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\

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

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified88.4%

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

    if -1.45000000000000012e158 < a < -9.1999999999999996e108 or -0.0016329999999999999 < a < 5.0000000000000002e75

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num75.9%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num75.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      8. div-inv74.6%

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr74.6%

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

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

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

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

    if -9.1999999999999996e108 < a < -0.0016329999999999999

    1. Initial program 72.8%

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

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

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

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

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

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

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

    if 5.0000000000000002e75 < a

    1. Initial program 70.2%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. *-commutative58.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
      2. *-lft-identity58.2%

        \[\leadsto x + \frac{y \cdot t}{\color{blue}{1 \cdot a}} \]
      3. times-frac66.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+158}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -0.001633:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+82} \lor \neg \left(z \leq 2.55 \cdot 10^{+79}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15000000000000007e82 or 2.5500000000000001e79 < z

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.15000000000000007e82 < z < 2.5500000000000001e79

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+82} \lor \neg \left(z \leq 2.15 \cdot 10^{+79}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.48e82 or 2.1500000000000002e79 < z

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.48e82 < z < 2.1500000000000002e79

    1. Initial program 84.8%

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

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

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

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

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

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

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

Alternative 8: 75.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-67} \lor \neg \left(a \leq 4.4 \cdot 10^{-40}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.0000000000000001e-67 or 4.40000000000000018e-40 < a

    1. Initial program 68.0%

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

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

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

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

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

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

    if -7.0000000000000001e-67 < a < 4.40000000000000018e-40

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 36.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-298}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.0000000000000001e-67 or 5.19999999999999971e-57 < a

    1. Initial program 67.4%

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

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

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

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

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

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

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

    if -7.0000000000000001e-67 < a < -1.7499999999999999e-298

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num71.6%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num70.8%

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr70.7%

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

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

    if -1.7499999999999999e-298 < a < 5.19999999999999971e-57

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified46.6%

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

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

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

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

Alternative 10: 66.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3000000000000002e-20 or 1.6e16 < z

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num69.4%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num68.4%

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr68.4%

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

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

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

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

    if -5.3000000000000002e-20 < z < 1.6e16

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 65.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0999999999999999e-20 or 2.5e16 < z

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num69.4%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num68.4%

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr68.4%

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

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

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

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

    if -2.0999999999999999e-20 < z < 2.5e16

    1. Initial program 88.9%

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

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

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

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

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

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

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

Alternative 12: 62.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3000000000000002e-20 or 3e16 < z

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num69.4%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num68.4%

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr68.4%

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

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

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

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

    if -5.3000000000000002e-20 < z < 3e16

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 68.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.001633:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.0016329999999999999

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0016329999999999999 < a < 1.02000000000000002e-53

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.02000000000000002e-53 < a

    1. Initial program 67.7%

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

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

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

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

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

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

Alternative 14: 50.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative64.9%

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

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

    if -1.48e82 < z < 3.2999999999999999e99

    1. Initial program 85.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified55.0%

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

    if 3.2999999999999999e99 < z

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    11. Step-by-step derivation
      1. clear-num43.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      2. un-div-inv43.2%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    12. Applied egg-rr43.2%

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

Alternative 15: 50.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative64.9%

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

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

    if -1.48e82 < z < 1.75e97

    1. Initial program 85.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified55.0%

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

    if 1.75e97 < z

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 49.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num57.3%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num56.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      8. div-inv56.0%

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr56.0%

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

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

    if -2.35e82 < z < 8.40000000000000041e99

    1. Initial program 85.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified55.0%

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

    if 8.40000000000000041e99 < z

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 45.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num57.3%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num56.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      8. div-inv56.0%

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr56.0%

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

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

    if -2.39999999999999998e82 < z < 8.2000000000000002e93

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

    if 8.2000000000000002e93 < z

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 48.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.39999999999999998e82 or 1.4e17 < z

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + \left(-z\right) \cdot \frac{t - x}{a - z}\right) \]
      6. distribute-rgt-out62.0%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y + \left(-z\right)\right)} \]
      7. sub-neg62.0%

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\left(y - z\right)} \]
      8. associate-/r/65.0%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Simplified65.0%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num65.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
      2. associate-/r*33.1%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      3. add-cube-cbrt32.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right) \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}} \]
      4. pow332.7%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right)}^{3}} \]
      5. +-commutative32.7%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}} + x}}\right)}^{3} \]
      6. associate-/r*64.0%

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num63.9%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      8. div-inv63.9%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      9. clear-num63.9%

        \[\leadsto {\left(\sqrt[3]{\left(t - x\right) \cdot \color{blue}{\frac{y - z}{a - z}} + x}\right)}^{3} \]
      10. fma-define64.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr64.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}\right)}^{3}} \]
    10. Taylor expanded in z around inf 44.0%

      \[\leadsto \color{blue}{t} \]

    if -2.39999999999999998e82 < z < 1.4e17

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.6%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 64.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    6. Taylor expanded in x around inf 55.4%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg55.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg55.4%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified55.4%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 38.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+82}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.95e+82) t (if (<= z 6.5e+16) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.95e+82) {
		tmp = t;
	} else if (z <= 6.5e+16) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.95d+82)) then
        tmp = t
    else if (z <= 6.5d+16) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.95e+82) {
		tmp = t;
	} else if (z <= 6.5e+16) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.95e+82:
		tmp = t
	elif z <= 6.5e+16:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.95e+82)
		tmp = t;
	elseif (z <= 6.5e+16)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.95e+82)
		tmp = t;
	elseif (z <= 6.5e+16)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+82], t, If[LessEqual[z, 6.5e+16], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+82}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+16}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.94999999999999988e82 or 6.5e16 < z

    1. Initial program 33.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*62.0%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified62.0%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 34.8%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg34.8%

        \[\leadsto x + \left(\color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
      2. associate-/l*62.0%

        \[\leadsto x + \left(\left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
      3. distribute-lft-neg-out62.0%

        \[\leadsto x + \left(\color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z}} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
      4. +-commutative62.0%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) + \left(-z\right) \cdot \frac{t - x}{a - z}\right)} \]
      5. div-sub62.0%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + \left(-z\right) \cdot \frac{t - x}{a - z}\right) \]
      6. distribute-rgt-out62.0%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y + \left(-z\right)\right)} \]
      7. sub-neg62.0%

        \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\left(y - z\right)} \]
      8. associate-/r/65.0%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Simplified65.0%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num65.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
      2. associate-/r*33.1%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      3. add-cube-cbrt32.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right) \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}} \]
      4. pow332.7%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right)}^{3}} \]
      5. +-commutative32.7%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}} + x}}\right)}^{3} \]
      6. associate-/r*64.0%

        \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
      7. clear-num63.9%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      8. div-inv63.9%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
      9. clear-num63.9%

        \[\leadsto {\left(\sqrt[3]{\left(t - x\right) \cdot \color{blue}{\frac{y - z}{a - z}} + x}\right)}^{3} \]
      10. fma-define64.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
    9. Applied egg-rr64.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}\right)}^{3}} \]
    10. Taylor expanded in z around inf 44.0%

      \[\leadsto \color{blue}{t} \]

    if -1.94999999999999988e82 < z < 6.5e16

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative85.3%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      2. *-commutative85.3%

        \[\leadsto \frac{\color{blue}{\left(t - x\right) \cdot \left(y - z\right)}}{a - z} + x \]
      3. associate-/l*92.0%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define92.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    3. Simplified92.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 38.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 24.9% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 65.8%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*79.8%

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified79.8%

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 68.5%

    \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right)} \]
  6. Step-by-step derivation
    1. mul-1-neg68.5%

      \[\leadsto x + \left(\color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
    2. associate-/l*78.2%

      \[\leadsto x + \left(\left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
    3. distribute-lft-neg-out78.2%

      \[\leadsto x + \left(\color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z}} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right) \]
    4. +-commutative78.2%

      \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) + \left(-z\right) \cdot \frac{t - x}{a - z}\right)} \]
    5. div-sub78.2%

      \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + \left(-z\right) \cdot \frac{t - x}{a - z}\right) \]
    6. distribute-rgt-out79.8%

      \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y + \left(-z\right)\right)} \]
    7. sub-neg79.8%

      \[\leadsto x + \frac{t - x}{a - z} \cdot \color{blue}{\left(y - z\right)} \]
    8. associate-/r/81.9%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
  7. Simplified81.9%

    \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
  8. Step-by-step derivation
    1. clear-num81.9%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}}} \]
    2. associate-/r*65.7%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    3. add-cube-cbrt64.9%

      \[\leadsto \color{blue}{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right) \cdot \sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}} \]
    4. pow364.9%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x + \frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}}\right)}^{3}} \]
    5. +-commutative64.9%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}} + x}}\right)}^{3} \]
    6. associate-/r*80.8%

      \[\leadsto {\left(\sqrt[3]{\frac{1}{\color{blue}{\frac{\frac{a - z}{y - z}}{t - x}}} + x}\right)}^{3} \]
    7. clear-num80.7%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
    8. div-inv80.5%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(t - x\right) \cdot \frac{1}{\frac{a - z}{y - z}}} + x}\right)}^{3} \]
    9. clear-num80.7%

      \[\leadsto {\left(\sqrt[3]{\left(t - x\right) \cdot \color{blue}{\frac{y - z}{a - z}} + x}\right)}^{3} \]
    10. fma-define80.7%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}}\right)}^{3} \]
  9. Applied egg-rr80.7%

    \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)}\right)}^{3}} \]
  10. Taylor expanded in z around inf 21.7%

    \[\leadsto \color{blue}{t} \]
  11. Add Preprocessing

Developer Target 1: 84.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024170 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))