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

Percentage Accurate: 67.6% → 90.4%
Time: 15.3s
Alternatives: 17
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

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

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

        \[\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--99.6%

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

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

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

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

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

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

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

    1. Initial program 72.7%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified88.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. fma-undefine88.5%

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

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

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

Alternative 2: 90.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

        \[\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--99.6%

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

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

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

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

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

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

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

Alternative 3: 90.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num90.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    8. Simplified90.9%

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

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

    1. Initial program 4.6%

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

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

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

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

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

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

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

        \[\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--99.6%

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

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

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

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

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

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

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

Alternative 4: 41.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-98}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{-260}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.54999999999999988e46 or 6e-52 < t

    1. Initial program 49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{a \cdot \frac{x}{t}} \]
    11. Simplified53.1%

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

    if -1.54999999999999988e46 < t < -3.6000000000000002e-98 or -6.5000000000000004e-230 < t < 1.05000000000000002e-260

    1. Initial program 93.1%

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

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

    if -3.6000000000000002e-98 < t < -6.5000000000000004e-230 or 1.05000000000000002e-260 < t < 6e-52

    1. Initial program 91.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified95.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. fma-undefine95.9%

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

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

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

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

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

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

Alternative 5: 38.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y + a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5.3 \cdot 10^{-96}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-262}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.54999999999999988e46 or 3.6000000000000001e42 < t

    1. Initial program 43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y - -1 \cdot \frac{a \cdot y}{t}} \]
    10. Step-by-step derivation
      1. sub-neg47.7%

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

        \[\leadsto y + \left(-\color{blue}{\left(-\frac{a \cdot y}{t}\right)}\right) \]
      3. remove-double-neg47.7%

        \[\leadsto y + \color{blue}{\frac{a \cdot y}{t}} \]
      4. associate-/l*51.4%

        \[\leadsto y + \color{blue}{a \cdot \frac{y}{t}} \]
    11. Simplified51.4%

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

    if -1.54999999999999988e46 < t < -5.3000000000000001e-96 or -7.1999999999999997e-230 < t < 7.1999999999999995e-262

    1. Initial program 93.1%

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

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

    if -5.3000000000000001e-96 < t < -7.1999999999999997e-230

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999995e-262 < t < 3.6000000000000001e42

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 38.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.85 \cdot 10^{-98}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-261}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.8000000000000002e45 or 9.39999999999999971e42 < t

    1. Initial program 43.8%

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

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

    if -3.8000000000000002e45 < t < -2.8499999999999999e-98 or -8.00000000000000037e-230 < t < 4.19999999999999991e-261

    1. Initial program 93.1%

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

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

    if -2.8499999999999999e-98 < t < -8.00000000000000037e-230

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999991e-261 < t < 9.39999999999999971e42

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 38.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-96}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-262}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9000000000000002e44 or 3.10000000000000005e48 < t

    1. Initial program 43.8%

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

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

    if -2.9000000000000002e44 < t < -2.6000000000000002e-96 or -4.8000000000000004e-230 < t < 1.9000000000000001e-262

    1. Initial program 93.1%

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

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

    if -2.6000000000000002e-96 < t < -4.8000000000000004e-230

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified56.4%

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

    if 1.9000000000000001e-262 < t < 3.10000000000000005e48

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.3% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4000000000000001e-16 or 8.50000000000000008e-72 < t < 5.4000000000000003e152

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-16 < t < 8.50000000000000008e-72

    1. Initial program 93.1%

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

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

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

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

    if 5.4000000000000003e152 < t

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{a \cdot \frac{x}{t}} \]
    11. Simplified76.2%

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

Alternative 9: 78.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 39.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.39999999999999997e92 < t < 2.69999999999999993e103

    1. Initial program 87.0%

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

    if 2.69999999999999993e103 < t

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 38.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -1.4 \cdot 10^{-96}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+44}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.19999999999999995e45 or 1.8e44 < t

    1. Initial program 43.8%

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

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

    if -1.19999999999999995e45 < t < -1.40000000000000008e-96 or -7.5999999999999996e-230 < t < 1.8e44

    1. Initial program 88.3%

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

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

    if -1.40000000000000008e-96 < t < -7.5999999999999996e-230

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    10. Simplified56.4%

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

Alternative 11: 73.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.64999999999999994e-16 or 1.8999999999999999e-61 < a

    1. Initial program 71.0%

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

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

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

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

    if -1.64999999999999994e-16 < a < 1.8999999999999999e-61

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 64.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.8000000000000002e-15 or 4.6000000000000001e26 < a

    1. Initial program 68.7%

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

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

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

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

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

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

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

    if -3.8000000000000002e-15 < a < 4.6000000000000001e26

    1. Initial program 75.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified83.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. fma-undefine83.9%

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

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

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

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

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

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

Alternative 13: 56.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+116} \lor \neg \left(x \leq 1.9 \cdot 10^{+103}\right):\\
\;\;\;\;x \cdot \frac{z - a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.59999999999999971e116 or 1.8999999999999998e103 < x

    1. Initial program 62.6%

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

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

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

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

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

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

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

        \[\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--43.5%

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

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

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

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

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

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

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

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

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

    if -3.59999999999999971e116 < x < 1.8999999999999998e103

    1. Initial program 75.5%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified88.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. fma-undefine88.0%

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

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

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

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

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

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

Alternative 14: 69.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 70.2%

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

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

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

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

    if -4.5000000000000002e-16 < a < 2e-51

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e-51 < a

    1. Initial program 71.9%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. clear-num91.2%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      3. div-sub91.2%

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
    8. Simplified91.2%

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

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

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

Alternative 15: 48.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.19999999999999957e65 or 3.4000000000000001e24 < a

    1. Initial program 68.0%

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

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

    if -7.19999999999999957e65 < a < 3.4000000000000001e24

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{t}} \]
    11. Simplified56.1%

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

Alternative 16: 39.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+43}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e46 or 1.60000000000000007e43 < t

    1. Initial program 43.8%

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

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

    if -1.05e46 < t < 1.60000000000000007e43

    1. Initial program 88.7%

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

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

Alternative 17: 25.7% 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 71.7%

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

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

Developer Target 1: 86.6% 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 2024135 
(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))))