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

Percentage Accurate: 67.9% → 89.2%
Time: 11.7s
Alternatives: 16
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 89.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+189}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.50000000000000004e123 or 1.8999999999999999e189 < z

    1. Initial program 30.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

    if -1.50000000000000004e123 < z < 1.8999999999999999e189

    1. Initial program 83.2%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
      8. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      11. lower-fma.f64N/A

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

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

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

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

Alternative 2: 73.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-171}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+189}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8000000000000001e-14 or 1.8999999999999999e189 < z

    1. Initial program 45.3%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6484.4

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

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

    if -2.8000000000000001e-14 < z < 3.2000000000000001e-171

    1. Initial program 88.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
      6. lower-/.f64N/A

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

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

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

    if 3.2000000000000001e-171 < z < 1.8999999999999999e189

    1. Initial program 75.7%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6475.6

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
    8. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{1}{\color{blue}{a - z}} \cdot \left(\left(y - z\right) \cdot t\right) + x \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\color{blue}{\left(y - z\right)} \cdot t\right) + x \]
      4. lift-*.f64N/A

        \[\leadsto \frac{1}{a - z} \cdot \color{blue}{\left(\left(y - z\right) \cdot t\right)} + x \]
      5. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\left(\frac{1}{a - z} \cdot \left(y - z\right)\right) \cdot t} + x \]
      7. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z} \cdot \left(y - z\right), t, x\right)} \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y - z\right) \cdot \frac{1}{a - z}}, t, x\right) \]
      9. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(y - z\right) \cdot \color{blue}{\frac{1}{a - z}}, t, x\right) \]
      10. un-div-invN/A

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

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

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

Alternative 3: 74.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-14 or 1.4000000000000001e-16 < z

    1. Initial program 51.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

    if -2.8000000000000001e-14 < z < 1.4000000000000001e-16

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
      6. lower-/.f64N/A

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

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

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

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

Alternative 4: 71.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-14 or 1.4000000000000001e-16 < z

    1. Initial program 51.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6476.8

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

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

    if -2.8000000000000001e-14 < z < 1.4000000000000001e-16

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, \frac{t - x}{a}, x\right) \]
      6. lower-/.f64N/A

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

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

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

Alternative 5: 72.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-14 or 1.4000000000000001e-16 < z

    1. Initial program 51.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6476.8

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

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

    if -2.8000000000000001e-14 < z < 1.4000000000000001e-16

    1. Initial program 89.6%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} + x \]
      8. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
      12. lower-/.f6495.6

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

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

      \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a}}, x\right) \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

Alternative 6: 69.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.90000000000000019e-15 or 2.40000000000000002e-27 < z

    1. Initial program 53.0%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6476.6

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

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

    if -2.90000000000000019e-15 < z < 2.40000000000000002e-27

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
      4. lower-/.f64N/A

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

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

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

Alternative 7: 61.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.70000000000000011e-13 or 1.34999999999999993e37 < z

    1. Initial program 49.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{t \cdot y}{z}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      4. *-commutativeN/A

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
      5. associate-/l*N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      6. lower-*.f64N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      7. lower-/.f6462.7

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

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

    if -2.70000000000000011e-13 < z < 1.34999999999999993e37

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{t - x}{a}}, x\right) \]
      5. lower--.f6477.1

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

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

Alternative 8: 58.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y - z}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.29999999999999979e-13 or 3.5999999999999997e36 < z

    1. Initial program 49.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{t \cdot y}{z}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      4. *-commutativeN/A

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
      5. associate-/l*N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      6. lower-*.f64N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      7. lower-/.f6462.7

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

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

    if -2.29999999999999979e-13 < z < 3.5999999999999997e36

    1. Initial program 89.3%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6489.3

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} + x \]
      3. lower-fma.f64N/A

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

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

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

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

Alternative 9: 55.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-14 or 1.20000000000000001e-27 < z

    1. Initial program 53.0%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6476.6

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(\frac{t \cdot y}{z}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{t - \frac{t \cdot y}{z}} \]
      4. *-commutativeN/A

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
      5. associate-/l*N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      6. lower-*.f64N/A

        \[\leadsto t - \color{blue}{y \cdot \frac{t}{z}} \]
      7. lower-/.f6460.3

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

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

    if -2.8000000000000001e-14 < z < 1.20000000000000001e-27

    1. Initial program 89.3%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6489.3

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{y}{a}, x\right)} \]
      4. lower-/.f6459.7

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

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

Alternative 10: 52.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-14 or 1.20000000000000001e-27 < z

    1. Initial program 53.0%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6476.6

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(\frac{y}{z} - 1\right)} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \left(\frac{y}{z} - 1\right) \]
      3. *-inversesN/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\frac{y}{z} - \color{blue}{\frac{z}{z}}\right) \]
      4. div-subN/A

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\frac{y - z}{z}} \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot \frac{y - z}{z}\right)} \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{t \cdot \left(y - z\right)}{z}}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{\left(y - z\right) \cdot t}}{z}\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(y - z\right) \cdot \frac{t}{z}}\right) \]
      9. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right) \cdot \frac{t}{z}} \]
      10. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - z\right)\right)} \cdot \frac{t}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - z\right)\right) \cdot \frac{t}{z}} \]
      12. sub-negN/A

        \[\leadsto \left(-1 \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)}\right) \cdot \frac{t}{z} \]
      13. mul-1-negN/A

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

        \[\leadsto \left(-1 \cdot \color{blue}{\left(-1 \cdot z + y\right)}\right) \cdot \frac{t}{z} \]
      15. distribute-lft-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(-1 \cdot z\right) + -1 \cdot y\right)} \cdot \frac{t}{z} \]
      16. neg-mul-1N/A

        \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right)} + -1 \cdot y\right) \cdot \frac{t}{z} \]
      17. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + -1 \cdot y\right) \cdot \frac{t}{z} \]
      18. remove-double-negN/A

        \[\leadsto \left(\color{blue}{z} + -1 \cdot y\right) \cdot \frac{t}{z} \]
      19. mul-1-negN/A

        \[\leadsto \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot \frac{t}{z} \]
      20. unsub-negN/A

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{t}{z} \]
      21. lower--.f64N/A

        \[\leadsto \color{blue}{\left(z - y\right)} \cdot \frac{t}{z} \]
      22. lower-/.f6455.4

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

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

    if -2.8000000000000001e-14 < z < 1.20000000000000001e-27

    1. Initial program 89.3%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6489.3

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{y}{a}, x\right)} \]
      4. lower-/.f6459.7

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

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

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

Alternative 11: 51.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-13}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.79999999999999986e-13

    1. Initial program 53.5%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6453.4

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{t + x} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{x + t} \]
      2. lower-+.f6446.4

        \[\leadsto \color{blue}{x + t} \]
    10. Simplified46.4%

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

    if -8.79999999999999986e-13 < z < 5.4999999999999997e95

    1. Initial program 88.1%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6488.1

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{y}{a}, x\right)} \]
      4. lower-/.f6455.1

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{y}{a}, x\right)} \]

    if 5.4999999999999997e95 < z

    1. Initial program 38.5%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6439.1

        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    5. Simplified39.1%

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(t - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{t - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{t - \left(x - x\right)} \]
      6. lower--.f6457.2

        \[\leadsto t - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr57.2%

      \[\leadsto \color{blue}{t - \left(x - x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.1%

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

Alternative 12: 38.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+96}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.69999999999999998e108

    1. Initial program 81.1%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(t - x\right)}}{a - z} \]
      5. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(t - x\right)}}{a} \]
      3. lower--.f6446.4

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
      2. lower-*.f6432.4

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

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

    if -1.69999999999999998e108 < y < 3.9e96

    1. Initial program 68.9%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6469.0

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{t + x} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{x + t} \]
      2. lower-+.f6449.6

        \[\leadsto \color{blue}{x + t} \]
    10. Simplified49.6%

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

    if 3.9e96 < y

    1. Initial program 59.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6456.1

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      3. lower-/.f6440.0

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

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

Alternative 13: 39.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+96}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.70000000000000008e111 or 3.9e96 < y

    1. Initial program 70.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right)\right) + t \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}}\right)\right) + t \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \frac{y - a}{z}} + t \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - x\right)\right)} \cdot \frac{y - a}{z} + t \]
      10. lower-fma.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(x - t\right)}{z} + t} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(x - t\right) \cdot \frac{y}{z}} + t \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - t}, \frac{y}{z}, t\right) \]
      6. lower-/.f6460.5

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      3. lower-/.f6433.7

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
    11. Simplified33.7%

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

    if -4.70000000000000008e111 < y < 3.9e96

    1. Initial program 69.1%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6469.1

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{t + x} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{x + t} \]
      2. lower-+.f6449.3

        \[\leadsto \color{blue}{x + t} \]
    10. Simplified49.3%

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

Alternative 14: 35.9% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{+190}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.89999999999999982e190

    1. Initial program 74.4%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
      5. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
      11. lower-/.f6474.3

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{t + x} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{x + t} \]
      2. lower-+.f6436.9

        \[\leadsto \color{blue}{x + t} \]
    10. Simplified36.9%

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

    if 1.89999999999999982e190 < z

    1. Initial program 21.2%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6441.8

        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    5. Simplified41.8%

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(t - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{t - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{t - \left(x - x\right)} \]
      6. lower--.f6471.3

        \[\leadsto t - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr71.3%

      \[\leadsto \color{blue}{t - \left(x - x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.0%

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

Alternative 15: 34.5% accurate, 7.3× speedup?

\[\begin{array}{l} \\ x + t \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x t))
double code(double x, double y, double z, double t, double a) {
	return x + 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 + t
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + t;
}
def code(x, y, z, t, a):
	return x + t
function code(x, y, z, t, a)
	return Float64(x + t)
end
function tmp = code(x, y, z, t, a)
	tmp = x + t;
end
code[x_, y_, z_, t_, a_] := N[(x + t), $MachinePrecision]
\begin{array}{l}

\\
x + t
\end{array}
Derivation
  1. Initial program 69.6%

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

      \[\leadsto x + \frac{\color{blue}{\left(y - z\right)} \cdot \left(t - x\right)}{a - z} \]
    2. lift--.f64N/A

      \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
    3. lift-*.f64N/A

      \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a - z} \]
    4. lift--.f64N/A

      \[\leadsto x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{\color{blue}{a - z}} \]
    5. lift-/.f64N/A

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

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} + x} \]
    7. lift-/.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} + x \]
    10. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{a - z}, \left(y - z\right) \cdot \left(t - x\right), x\right)} \]
    11. lower-/.f6469.6

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

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

    \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{t \cdot \left(y - z\right)}, x\right) \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(\frac{1}{a - z}, \color{blue}{\left(y - z\right) \cdot t}, x\right) \]
    2. lower-*.f64N/A

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

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

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

    \[\leadsto \color{blue}{t + x} \]
  9. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{x + t} \]
    2. lower-+.f6437.8

      \[\leadsto \color{blue}{x + t} \]
  10. Simplified37.8%

    \[\leadsto \color{blue}{x + t} \]
  11. Add Preprocessing

Alternative 16: 2.8% accurate, 29.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 69.6%

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

    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
  4. Step-by-step derivation
    1. lower--.f6422.6

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
  5. Simplified22.6%

    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
  6. Taylor expanded in t around 0

    \[\leadsto x + \color{blue}{-1 \cdot x} \]
  7. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
    2. lower-neg.f642.8

      \[\leadsto x + \color{blue}{\left(-x\right)} \]
  8. Simplified2.8%

    \[\leadsto x + \color{blue}{\left(-x\right)} \]
  9. Step-by-step derivation
    1. unsub-negN/A

      \[\leadsto \color{blue}{x - x} \]
    2. +-inverses2.8

      \[\leadsto \color{blue}{0} \]
  10. Applied egg-rr2.8%

    \[\leadsto \color{blue}{0} \]
  11. Add Preprocessing

Developer Target 1: 83.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

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