Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 94.5%
Time: 20.6s
Alternatives: 22
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - z\right) \cdot \frac{t - x}{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 22 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: 80.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 94.5% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 88.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr94.1%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub94.2%

        \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    6. Applied egg-rr94.2%

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

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

    1. Initial program 3.0%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. associate--l+75.1%

        \[\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. distribute-lft-out--75.1%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.5%

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

    if -9.9999999999999997e-242 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999998e-299

    1. Initial program 3.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 74.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}} \]
    4. Step-by-step derivation
      1. associate--l+74.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. distribute-lft-out--74.9%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

    1. Initial program 3.0%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. associate--l+75.1%

        \[\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. distribute-lft-out--75.1%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x - y \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -7.2 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-205}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+115}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{+122}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (* y (/ (- x t) a)))))
   (if (<= a -7.2e+125)
     t_2
     (if (<= a -1.55e-205)
       t_1
       (if (<= a 1.25e-246)
         (* y (/ (- t x) (- a z)))
         (if (<= a 6.5e+45)
           t_1
           (if (<= a 2.6e+115)
             t_2
             (if (<= a 6.3e+122)
               (* t (- 1.0 (/ y z)))
               (- x (* t (/ (- z y) a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -7.2e+125) {
		tmp = t_2;
	} else if (a <= -1.55e-205) {
		tmp = t_1;
	} else if (a <= 1.25e-246) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.5e+45) {
		tmp = t_1;
	} else if (a <= 2.6e+115) {
		tmp = t_2;
	} else if (a <= 6.3e+122) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x - (t * ((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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x - (y * ((x - t) / a))
    if (a <= (-7.2d+125)) then
        tmp = t_2
    else if (a <= (-1.55d-205)) then
        tmp = t_1
    else if (a <= 1.25d-246) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 6.5d+45) then
        tmp = t_1
    else if (a <= 2.6d+115) then
        tmp = t_2
    else if (a <= 6.3d+122) then
        tmp = t * (1.0d0 - (y / z))
    else
        tmp = x - (t * ((z - y) / 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 t_2 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -7.2e+125) {
		tmp = t_2;
	} else if (a <= -1.55e-205) {
		tmp = t_1;
	} else if (a <= 1.25e-246) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.5e+45) {
		tmp = t_1;
	} else if (a <= 2.6e+115) {
		tmp = t_2;
	} else if (a <= 6.3e+122) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x - (t * ((z - y) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x - (y * ((x - t) / a))
	tmp = 0
	if a <= -7.2e+125:
		tmp = t_2
	elif a <= -1.55e-205:
		tmp = t_1
	elif a <= 1.25e-246:
		tmp = y * ((t - x) / (a - z))
	elif a <= 6.5e+45:
		tmp = t_1
	elif a <= 2.6e+115:
		tmp = t_2
	elif a <= 6.3e+122:
		tmp = t * (1.0 - (y / z))
	else:
		tmp = x - (t * ((z - y) / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x - Float64(y * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -7.2e+125)
		tmp = t_2;
	elseif (a <= -1.55e-205)
		tmp = t_1;
	elseif (a <= 1.25e-246)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 6.5e+45)
		tmp = t_1;
	elseif (a <= 2.6e+115)
		tmp = t_2;
	elseif (a <= 6.3e+122)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x - Float64(t * Float64(Float64(z - y) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x - (y * ((x - t) / a));
	tmp = 0.0;
	if (a <= -7.2e+125)
		tmp = t_2;
	elseif (a <= -1.55e-205)
		tmp = t_1;
	elseif (a <= 1.25e-246)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 6.5e+45)
		tmp = t_1;
	elseif (a <= 2.6e+115)
		tmp = t_2;
	elseif (a <= 6.3e+122)
		tmp = t * (1.0 - (y / z));
	else
		tmp = x - (t * ((z - y) / 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]}, Block[{t$95$2 = N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e+125], t$95$2, If[LessEqual[a, -1.55e-205], t$95$1, If[LessEqual[a, 1.25e-246], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+45], t$95$1, If[LessEqual[a, 2.6e+115], t$95$2, If[LessEqual[a, 6.3e+122], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -7.2000000000000007e125 or 6.50000000000000034e45 < a < 2.6e115

    1. Initial program 93.7%

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

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

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

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

    if -7.2000000000000007e125 < a < -1.54999999999999991e-205 or 1.2499999999999999e-246 < a < 6.50000000000000034e45

    1. Initial program 76.0%

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

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

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

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

    if -1.54999999999999991e-205 < a < 1.2499999999999999e-246

    1. Initial program 68.9%

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

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

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

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

    if 2.6e115 < a < 6.3000000000000001e122

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if 6.3000000000000001e122 < a

    1. Initial program 85.4%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr88.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+125}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-205}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+115}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{+122}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x - y \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -53000000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (* y (/ (- x t) a)))))
   (if (<= a -5.5e+125)
     t_2
     (if (<= a -4.8e+59)
       t_1
       (if (<= a -53000000000000.0)
         t_2
         (if (<= a 2.8e-155)
           (+ t (/ (* y (- x t)) z))
           (if (<= a 1.46e+38) t_1 (+ x (/ (- t x) (/ a y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -5.5e+125) {
		tmp = t_2;
	} else if (a <= -4.8e+59) {
		tmp = t_1;
	} else if (a <= -53000000000000.0) {
		tmp = t_2;
	} else if (a <= 2.8e-155) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.46e+38) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x - (y * ((x - t) / a))
    if (a <= (-5.5d+125)) then
        tmp = t_2
    else if (a <= (-4.8d+59)) then
        tmp = t_1
    else if (a <= (-53000000000000.0d0)) then
        tmp = t_2
    else if (a <= 2.8d-155) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 1.46d+38) then
        tmp = t_1
    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 t_1 = t * ((y - z) / (a - z));
	double t_2 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -5.5e+125) {
		tmp = t_2;
	} else if (a <= -4.8e+59) {
		tmp = t_1;
	} else if (a <= -53000000000000.0) {
		tmp = t_2;
	} else if (a <= 2.8e-155) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.46e+38) {
		tmp = t_1;
	} else {
		tmp = x + ((t - x) / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x - (y * ((x - t) / a))
	tmp = 0
	if a <= -5.5e+125:
		tmp = t_2
	elif a <= -4.8e+59:
		tmp = t_1
	elif a <= -53000000000000.0:
		tmp = t_2
	elif a <= 2.8e-155:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 1.46e+38:
		tmp = t_1
	else:
		tmp = x + ((t - x) / (a / y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x - Float64(y * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -5.5e+125)
		tmp = t_2;
	elseif (a <= -4.8e+59)
		tmp = t_1;
	elseif (a <= -53000000000000.0)
		tmp = t_2;
	elseif (a <= 2.8e-155)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 1.46e+38)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x - (y * ((x - t) / a));
	tmp = 0.0;
	if (a <= -5.5e+125)
		tmp = t_2;
	elseif (a <= -4.8e+59)
		tmp = t_1;
	elseif (a <= -53000000000000.0)
		tmp = t_2;
	elseif (a <= 2.8e-155)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 1.46e+38)
		tmp = t_1;
	else
		tmp = x + ((t - x) / (a / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+125], t$95$2, If[LessEqual[a, -4.8e+59], t$95$1, If[LessEqual[a, -53000000000000.0], t$95$2, If[LessEqual[a, 2.8e-155], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.46e+38], t$95$1, N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -53000000000000:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 1.46 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.49999999999999996e125 or -4.8000000000000004e59 < a < -5.3e13

    1. Initial program 96.5%

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

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

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

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

    if -5.49999999999999996e125 < a < -4.8000000000000004e59 or 2.8e-155 < a < 1.46000000000000008e38

    1. Initial program 82.0%

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

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

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

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

    if -5.3e13 < a < 2.8e-155

    1. Initial program 67.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr72.2%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around inf 76.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+76.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/76.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/76.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-neg76.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-sub76.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-neg76.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--76.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/76.8%

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

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

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

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

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

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

    if 1.46000000000000008e38 < a

    1. Initial program 86.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr89.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+125}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -53000000000000:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 63.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.79999999999999986e125 or 1.11999999999999993e70 < a

    1. Initial program 90.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr92.0%

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

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

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

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

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

    if -5.79999999999999986e125 < a < -1.60000000000000005e-205 or 9.49999999999999927e-251 < a < 1.11999999999999993e70

    1. Initial program 76.6%

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

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

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

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

    if -1.60000000000000005e-205 < a < 9.49999999999999927e-251

    1. Initial program 68.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+125}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-205}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-251}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+125}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-206}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -6.2e+125)
     (- x (* y (/ (- x t) a)))
     (if (<= a -4.2e-206)
       t_1
       (if (<= a 5e-246)
         (* y (/ (- t x) (- a z)))
         (if (<= a 6.1e+35) t_1 (+ x (/ (- t x) (/ a y)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -6.2e+125) {
		tmp = x - (y * ((x - t) / a));
	} else if (a <= -4.2e-206) {
		tmp = t_1;
	} else if (a <= 5e-246) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.1e+35) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (a <= (-6.2d+125)) then
        tmp = x - (y * ((x - t) / a))
    else if (a <= (-4.2d-206)) then
        tmp = t_1
    else if (a <= 5d-246) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 6.1d+35) then
        tmp = t_1
    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 t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -6.2e+125) {
		tmp = x - (y * ((x - t) / a));
	} else if (a <= -4.2e-206) {
		tmp = t_1;
	} else if (a <= 5e-246) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 6.1e+35) {
		tmp = t_1;
	} else {
		tmp = x + ((t - x) / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -6.2e+125:
		tmp = x - (y * ((x - t) / a))
	elif a <= -4.2e-206:
		tmp = t_1
	elif a <= 5e-246:
		tmp = y * ((t - x) / (a - z))
	elif a <= 6.1e+35:
		tmp = t_1
	else:
		tmp = x + ((t - x) / (a / y))
	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 <= -6.2e+125)
		tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a)));
	elseif (a <= -4.2e-206)
		tmp = t_1;
	elseif (a <= 5e-246)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 6.1e+35)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	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 <= -6.2e+125)
		tmp = x - (y * ((x - t) / a));
	elseif (a <= -4.2e-206)
		tmp = t_1;
	elseif (a <= 5e-246)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 6.1e+35)
		tmp = t_1;
	else
		tmp = x + ((t - x) / (a / y));
	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, -6.2e+125], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.2e-206], t$95$1, If[LessEqual[a, 5e-246], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.1e+35], t$95$1, N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 6.1 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 95.9%

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

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

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

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

    if -6.2e125 < a < -4.2000000000000002e-206 or 4.9999999999999997e-246 < a < 6.09999999999999977e35

    1. Initial program 75.6%

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

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

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

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

    if -4.2000000000000002e-206 < a < 4.9999999999999997e-246

    1. Initial program 68.9%

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

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

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

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

    if 6.09999999999999977e35 < a

    1. Initial program 86.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr89.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+125}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 44.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.75 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\


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

    1. Initial program 95.9%

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

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

    if -1.05e126 < a < -6.99999999999999982e-208 or 5.1999999999999998e-262 < a < 2.7500000000000002e38

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999982e-208 < a < 5.1999999999999998e-262

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    8. Simplified55.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr57.2%

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

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

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

    if 2.7500000000000002e38 < a

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(-y\right)}{y}} \]
      2. add-sqr-sqrt24.9%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \left(-y\right)}{y} \]
      3. sqrt-unprod23.3%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(-y\right)}{y} \]
      4. sqr-neg23.3%

        \[\leadsto \frac{\sqrt{\color{blue}{x \cdot x}} \cdot \left(-y\right)}{y} \]
      5. sqrt-unprod1.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(-y\right)}{y} \]
      6. add-sqr-sqrt2.4%

        \[\leadsto \frac{\color{blue}{x} \cdot \left(-y\right)}{y} \]
      7. add-sqr-sqrt1.1%

        \[\leadsto \frac{x \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}}{y} \]
      8. sqrt-unprod12.3%

        \[\leadsto \frac{x \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{y} \]
      9. sqr-neg12.3%

        \[\leadsto \frac{x \cdot \sqrt{\color{blue}{y \cdot y}}}{y} \]
      10. sqrt-unprod19.2%

        \[\leadsto \frac{x \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}}{y} \]
      11. add-sqr-sqrt46.1%

        \[\leadsto \frac{x \cdot \color{blue}{y}}{y} \]
    10. Applied egg-rr46.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+126}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-262}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.5499999999999999e30 or 2.99999999999999991e35 < a

    1. Initial program 91.1%

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

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

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

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

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

    if -1.5499999999999999e30 < a < -8.9999999999999992e-208 or 4.8000000000000001e-262 < a < 2.99999999999999991e35

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999992e-208 < a < 4.8000000000000001e-262

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    8. Simplified55.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr57.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{+30}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-262}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 52.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.9000000000000001e29 or 2.70000000000000003e35 < a

    1. Initial program 91.1%

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

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

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

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

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

    if -4.9000000000000001e29 < a < -6.99999999999999982e-208 or 1.52e-260 < a < 2.70000000000000003e35

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999982e-208 < a < 1.52e-260

    1. Initial program 69.0%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{a - z}} \]
    8. Simplified64.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.9 \cdot 10^{+29}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.52 \cdot 10^{-260}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 72.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.2e14 or 1.6499999999999999e24 < a

    1. Initial program 91.5%

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

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

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

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

    if -4.2e14 < a < 6.49999999999999997e-150

    1. Initial program 67.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr72.2%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around inf 76.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+76.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/76.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/76.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-neg76.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-sub76.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-neg76.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--76.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/76.8%

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

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

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

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

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

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

    if 6.49999999999999997e-150 < a < 1.6499999999999999e24

    1. Initial program 75.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+14}:\\ \;\;\;\;x + \frac{z - y}{a} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-150}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 36.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-157}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+42}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\


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

    1. Initial program 96.0%

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

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

    if -9.39999999999999958e123 < a < -3e-157 or 1.32000000000000004e-180 < a < 2.34999999999999993e42

    1. Initial program 78.8%

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

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

    if -3e-157 < a < 1.32000000000000004e-180

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. clear-num44.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr45.7%

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

    if 2.34999999999999993e42 < a

    1. Initial program 86.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y}} \cdot \left(-y\right) \]
      2. mul-1-neg40.3%

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(-y\right)}{y}} \]
      2. add-sqr-sqrt25.2%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \left(-y\right)}{y} \]
      3. sqrt-unprod23.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \left(-y\right)}{y} \]
      4. sqr-neg23.6%

        \[\leadsto \frac{\sqrt{\color{blue}{x \cdot x}} \cdot \left(-y\right)}{y} \]
      5. sqrt-unprod1.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \left(-y\right)}{y} \]
      6. add-sqr-sqrt2.4%

        \[\leadsto \frac{\color{blue}{x} \cdot \left(-y\right)}{y} \]
      7. add-sqr-sqrt1.1%

        \[\leadsto \frac{x \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}}{y} \]
      8. sqrt-unprod12.4%

        \[\leadsto \frac{x \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{y} \]
      9. sqr-neg12.4%

        \[\leadsto \frac{x \cdot \sqrt{\color{blue}{y \cdot y}}}{y} \]
      10. sqrt-unprod19.5%

        \[\leadsto \frac{x \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}}{y} \]
      11. add-sqr-sqrt46.8%

        \[\leadsto \frac{x \cdot \color{blue}{y}}{y} \]
    10. Applied egg-rr46.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-157}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-180}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -1.56 \cdot 10^{-65} \lor \neg \left(x \leq 2.2 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


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

    1. Initial program 62.3%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around inf 55.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+55.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/55.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/55.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-neg55.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-sub55.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-neg55.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--55.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/55.6%

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

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

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

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

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

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

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

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

    if -1.3e186 < x < -1.55999999999999993e-65 or 2.1999999999999999e-23 < x

    1. Initial program 78.8%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    5. 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)} \]
    6. Simplified55.4%

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

    if -1.55999999999999993e-65 < x < 2.1999999999999999e-23

    1. Initial program 87.7%

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

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

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

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

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

Alternative 14: 57.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -7 \cdot 10^{-71} \lor \neg \left(x \leq 2.35 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a} + 1\right)\\

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


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

    1. Initial program 62.3%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around inf 55.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+55.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/55.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/55.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-neg55.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-sub55.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-neg55.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--55.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/55.6%

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

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

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

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

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

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

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

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

    if -1.32000000000000005e186 < x < -6.9999999999999998e-71 or 2.35e-23 < x

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999998e-71 < x < 2.35e-23

    1. Initial program 87.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{+186}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-71} \lor \neg \left(x \leq 2.35 \cdot 10^{-23}\right):\\ \;\;\;\;x \cdot \left(\frac{z - y}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 57.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -7 \cdot 10^{-71} \lor \neg \left(x \leq 1.8 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a} + 1\right)\\

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


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

    1. Initial program 62.3%

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

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

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

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

    if -1.32000000000000009e187 < x < -6.9999999999999998e-71 or 1.7999999999999999e-23 < x

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999998e-71 < x < 1.7999999999999999e-23

    1. Initial program 87.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{+187}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-71} \lor \neg \left(x \leq 1.8 \cdot 10^{-23}\right):\\ \;\;\;\;x \cdot \left(\frac{z - y}{a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -8 \cdot 10^{-158}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+40}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999958e123 or 4.2000000000000002e40 < a

    1. Initial program 90.4%

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

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

    if -9.39999999999999958e123 < a < -8.00000000000000052e-158 or 2.99999999999999991e-184 < a < 4.2000000000000002e40

    1. Initial program 78.8%

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

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

    if -8.00000000000000052e-158 < a < 2.99999999999999991e-184

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-158}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+40}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 37.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-159}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+40}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999958e123 or 1.05000000000000005e40 < a

    1. Initial program 90.4%

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

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

    if -9.39999999999999958e123 < a < -5.00000000000000032e-159 or 8.40000000000000013e-181 < a < 1.05000000000000005e40

    1. Initial program 78.8%

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

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

    if -5.00000000000000032e-159 < a < 8.40000000000000013e-181

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. clear-num44.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr45.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-159}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-181}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+40}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-151}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+47}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999958e123 or 2.69999999999999996e47 < a

    1. Initial program 90.4%

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

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

    if -9.39999999999999958e123 < a < -1.89999999999999985e-151 or 2.69999999999999988e-185 < a < 2.69999999999999996e47

    1. Initial program 78.8%

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

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

    if -1.89999999999999985e-151 < a < 2.69999999999999988e-185

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. clear-num44.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr45.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-151}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-185}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+47}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 76.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8e16 or 3.8e20 < a

    1. Initial program 91.5%

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

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

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

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

    if -6.8e16 < a < 3.8e20

    1. Initial program 69.6%

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

      \[\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}} \]
    4. Step-by-step derivation
      1. associate--l+73.1%

        \[\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. distribute-lft-out--73.1%

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

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

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

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

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

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

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

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

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

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

Alternative 20: 51.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.17 \lor \neg \left(z \leq 2.9 \cdot 10^{-32}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.170000000000000012 or 2.89999999999999996e-32 < z

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

    if -0.170000000000000012 < z < 2.89999999999999996e-32

    1. Initial program 90.2%

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

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

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

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

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

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

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

Alternative 21: 38.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+47}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.39999999999999958e123 or 2.8999999999999998e47 < a

    1. Initial program 90.4%

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

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

    if -9.39999999999999958e123 < a < 2.8999999999999998e47

    1. Initial program 74.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+47}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 24.6% 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 80.9%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification21.9%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024059 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))