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

Percentage Accurate: 67.9% → 90.2%
Time: 16.0s
Alternatives: 20
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 90.2% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 71.2%

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

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

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

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

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

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

    1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.2%

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

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

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

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

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

    1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 72.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-173} \lor \neg \left(t \leq 9 \cdot 10^{-134}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\

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


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

    1. Initial program 20.3%

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

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

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

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

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

    if -1.54999999999999987e198 < t < -4.20000000000000003e-173 or 9.000000000000001e-134 < t

    1. Initial program 63.9%

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

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

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

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

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

    if -4.20000000000000003e-173 < t < 9.000000000000001e-134

    1. Initial program 92.8%

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

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

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

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

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

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

Alternative 4: 69.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{+21} \lor \neg \left(t \leq 4.4 \cdot 10^{+106}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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


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

    1. Initial program 20.3%

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

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

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

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

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

    if -6.79999999999999992e192 < t < -2.4e21 or 4.39999999999999983e106 < t

    1. Initial program 46.5%

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

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

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

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

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

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

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

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

    if -2.4e21 < t < 4.39999999999999983e106

    1. Initial program 84.3%

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

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

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

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

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

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

Alternative 5: 68.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{+73} \lor \neg \left(t \leq 2.05 \cdot 10^{+107}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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


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

    1. Initial program 20.3%

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

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

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

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

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

    if -1.05000000000000007e196 < t < -7.5e73 or 2.05e107 < t

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

    if -7.5e73 < t < 2.05e107

    1. Initial program 83.4%

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

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

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

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

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

Alternative 6: 72.5% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 20.3%

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

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

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

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

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

    if -1.15e198 < t < -4.20000000000000003e-173

    1. Initial program 73.7%

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

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

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

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

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

    if -4.20000000000000003e-173 < t < 4.6000000000000001e-134

    1. Initial program 92.8%

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

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

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

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

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

    if 4.6000000000000001e-134 < t

    1. Initial program 55.2%

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

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

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

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

      \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{y} \]
    6. Step-by-step derivation
      1. *-un-lft-identity77.1%

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

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

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

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

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

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

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

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

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

Alternative 7: 76.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-158} \lor \neg \left(a \leq 7.8 \cdot 10^{-115}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.50000000000000025e-158 or 7.7999999999999997e-115 < a

    1. Initial program 66.5%

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

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

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

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

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

    if -5.50000000000000025e-158 < a < 7.7999999999999997e-115

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+171} \lor \neg \left(a \leq 1.3 \cdot 10^{-115}\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.80000000000000009e171 or 1.30000000000000002e-115 < a

    1. Initial program 68.1%

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

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

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

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

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

    if -1.80000000000000009e171 < a < 1.30000000000000002e-115

    1. Initial program 66.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num79.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/79.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr79.8%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/55.0%

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

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

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

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

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

Alternative 9: 56.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.50000000000000017e173 or 1.4499999999999999e-115 < a

    1. Initial program 68.1%

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

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

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

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

    if -2.50000000000000017e173 < a < 1.4499999999999999e-115

    1. Initial program 66.7%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num79.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/79.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr79.8%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/55.0%

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

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

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

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

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

Alternative 10: 58.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-87} \lor \neg \left(y \leq 2.1 \cdot 10^{-116}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.20000000000000005e-87 or 2.0999999999999999e-116 < y

    1. Initial program 66.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num92.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/92.4%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr92.4%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/50.6%

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

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

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

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

    if -5.20000000000000005e-87 < y < 2.0999999999999999e-116

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 59.4% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 66.6%

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

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

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

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

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

    if -3.5999999999999999e28 < z < 7.49999999999999995e52

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

    if 7.49999999999999995e52 < z

    1. Initial program 72.8%

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

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

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

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

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

Alternative 12: 61.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-108}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6500000000000001e-108

    1. Initial program 56.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num80.0%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/79.9%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
      2. associate-*r/44.0%

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

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

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

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

    if -1.6500000000000001e-108 < t < 2.3000000000000002e106

    1. Initial program 84.5%

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

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

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

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

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

    if 2.3000000000000002e106 < t

    1. Initial program 35.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 43.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+173} \lor \neg \left(z \leq 3.2 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.70000000000000011e173 or 3.2000000000000001e111 < z

    1. Initial program 73.1%

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

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

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

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

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

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

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

    if -1.70000000000000011e173 < z < 3.2000000000000001e111

    1. Initial program 65.2%

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

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

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

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

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

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

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

Alternative 14: 42.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+172} \lor \neg \left(z \leq 4.3 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4999999999999994e172 or 4.29999999999999993e111 < z

    1. Initial program 73.1%

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

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

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

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

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

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

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

    if -7.4999999999999994e172 < z < 4.29999999999999993e111

    1. Initial program 65.2%

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

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

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

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

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

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

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

Alternative 15: 53.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.40000000000000013e56 or 1.5e105 < t

    1. Initial program 37.8%

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

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

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

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

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

    if -2.40000000000000013e56 < t < 1.5e105

    1. Initial program 84.2%

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

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

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

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

      \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{y} \]
    6. Step-by-step derivation
      1. *-un-lft-identity76.1%

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

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

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

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

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

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

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

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

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

Alternative 16: 53.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.40000000000000013e56 or 2.99999999999999984e108 < t

    1. Initial program 37.8%

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

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

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

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

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

    if -2.40000000000000013e56 < t < 2.99999999999999984e108

    1. Initial program 84.2%

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

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

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

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

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

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

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

Alternative 17: 39.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+175} \lor \neg \left(z \leq 4.8 \cdot 10^{+110}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6500000000000001e175 or 4.80000000000000025e110 < z

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

    if -1.6500000000000001e175 < z < 4.80000000000000025e110

    1. Initial program 65.2%

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

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

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

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

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

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

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

Alternative 18: 36.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-116}:\\
\;\;\;\;y\\

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

    if -5.09999999999999964e161 < a < 1.74999999999999992e-116

    1. Initial program 67.7%

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

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

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

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

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

    if 1.74999999999999992e-116 < a

    1. Initial program 71.2%

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

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

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

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

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

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

Alternative 19: 38.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+101}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000017e56 or 1.19999999999999994e101 < t

    1. Initial program 39.8%

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

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

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

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

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

    if -2.10000000000000017e56 < t < 1.19999999999999994e101

    1. Initial program 83.9%

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

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

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

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

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

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

Alternative 20: 24.8% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

Developer Target 1: 87.5% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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