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

Percentage Accurate: 68.6% → 88.8%
Time: 13.8s
Alternatives: 23
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 68.6% accurate, 1.0× speedup?

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

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

Alternative 1: 88.8% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.3000000000000002e141 or 4.69999999999999993e120 < t

    1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3000000000000002e141 < t < 4.69999999999999993e120

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 78.5% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.30000000000000002e142 or 1.42e-21 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000002e142 < t < -6.0000000000000003e-12

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      4. div-invN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{a - t} \cdot \left(z - t\right)\right) \cdot y} \]
      9. lower-*.f6471.3

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      14. lower-/.f6471.5

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    7. Applied egg-rr71.5%

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

    if -6.0000000000000003e-12 < t < 1.42e-21

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\ \mathbf{if}\;t \leq -2.3 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-26}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - 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 y) (/ (- z a) t) y)))
   (if (<= t -2.3e+142)
     t_1
     (if (<= t -6e-12)
       (* y (/ (- z t) (- a t)))
       (if (<= t 7.5e-26) (fma (- z t) (/ (- y x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), ((z - a) / t), y);
	double tmp;
	if (t <= -2.3e+142) {
		tmp = t_1;
	} else if (t <= -6e-12) {
		tmp = y * ((z - t) / (a - t));
	} else if (t <= 7.5e-26) {
		tmp = fma((z - t), ((y - x) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y)
	tmp = 0.0
	if (t <= -2.3e+142)
		tmp = t_1;
	elseif (t <= -6e-12)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (t <= 7.5e-26)
		tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+142], t$95$1, If[LessEqual[t, -6e-12], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-26], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.30000000000000002e142 or 7.4999999999999994e-26 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000002e142 < t < -6.0000000000000003e-12

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      4. div-invN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{a - t} \cdot \left(z - t\right)\right) \cdot y} \]
      9. lower-*.f6471.3

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      14. lower-/.f6471.5

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    7. Applied egg-rr71.5%

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

    if -6.0000000000000003e-12 < t < 7.4999999999999994e-26

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 73.3% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.30000000000000002e142 or 7.4999999999999994e-26 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000002e142 < t < -2.59999999999999983e-12

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      4. div-invN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{a - t} \cdot \left(z - t\right)\right) \cdot y} \]
      9. lower-*.f6471.3

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      14. lower-/.f6471.5

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    7. Applied egg-rr71.5%

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

    if -2.59999999999999983e-12 < t < 7.4999999999999994e-26

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 70.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.89999999999999988e141 or 1.96e-25 < t

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x - y}{t}} + y \]
      3. div-subN/A

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

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

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

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

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

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

    if -1.89999999999999988e141 < t < -2.59999999999999983e-12

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      4. div-invN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      14. lower-/.f6473.2

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    7. Applied egg-rr73.2%

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

    if -2.59999999999999983e-12 < t < 1.96e-25

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 69.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8500000000000001e141 or 1.96e-25 < t

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x - y}{t}} + y \]
      3. div-subN/A

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

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

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

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

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

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

    if -1.8500000000000001e141 < t < -2.59999999999999983e-12

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
      6. lower-/.f6473.1

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

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

    if -2.59999999999999983e-12 < t < 1.96e-25

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 88.9% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.80000000000000009e150 or 4.69999999999999993e120 < t

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000009e150 < t < 4.69999999999999993e120

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 43.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.7000000000000003e-72 or 1.55e8 < y

    1. Initial program 66.8%

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6456.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6452.2

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

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

    if -5.7000000000000003e-72 < y < 1.95000000000000014e-250

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.95000000000000014e-250 < y < 1.55e8

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6468.4

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      4. lower-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      5. lower-*.f6460.8

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

      \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
      2. lift-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.7000000000000003e-72 or 1.55e8 < y

    1. Initial program 66.8%

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6456.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6452.2

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

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

    if -5.7000000000000003e-72 < y < 3.49999999999999983e-178

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999983e-178 < y < 1.55e8

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6472.6

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      4. lower-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      5. lower-*.f6467.9

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
    8. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.7 \cdot 10^{-72}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-178}:\\ \;\;\;\;\frac{\left(z - a\right) \cdot x}{t}\\ \mathbf{elif}\;y \leq 155000000:\\ \;\;\;\;x - \frac{z \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x - \frac{z \cdot x}{a}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 13500000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.1000000000000003e95 or 1.35e7 < a

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6452.0

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      4. lower-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      5. lower-*.f6447.4

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
    8. Simplified47.4%

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

    if -3.1000000000000003e95 < a < -9.2000000000000003e-8

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a}} \]
      4. lower--.f6448.9

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

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

    if -9.2000000000000003e-8 < a < 1.35e7

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6456.8

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

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

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

Alternative 11: 35.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a}{t}, y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.20000000000000046e-55

    1. Initial program 55.9%

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

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

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Simplified32.2%

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

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

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

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

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

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6438.6

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr38.6%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    8. Step-by-step derivation
      1. +-inversesN/A

        \[\leadsto y - \color{blue}{0} \]
      2. --rgt-identity38.6

        \[\leadsto \color{blue}{y} \]
    9. Applied egg-rr38.6%

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

    if -9.20000000000000046e-55 < t < 4.6e-221

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
      3. lower-*.f6439.6

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified39.6%

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

    if 4.6e-221 < t < 9.4999999999999994e-22

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6460.6

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)}, x\right) \]
      6. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right), x\right) \]
      7. metadata-evalN/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + -1}, x\right) \]
      9. lower-/.f6415.4

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}}, x\right) \]
    11. Simplified34.1%

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

    if 9.4999999999999994e-22 < t

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(t \cdot \color{blue}{\frac{y}{a - t}}\right) \]
      6. lower--.f6448.0

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{a}{t}}, y\right) \]
    11. Simplified47.6%

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

Alternative 12: 35.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.20000000000000046e-55 or 9.4999999999999994e-22 < t

    1. Initial program 54.6%

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

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

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Simplified34.5%

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

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

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

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

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

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6442.6

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr42.6%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    8. Step-by-step derivation
      1. +-inversesN/A

        \[\leadsto y - \color{blue}{0} \]
      2. --rgt-identity42.6

        \[\leadsto \color{blue}{y} \]
    9. Applied egg-rr42.6%

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

    if -9.20000000000000046e-55 < t < 4.6e-221

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
      3. lower-*.f6439.6

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified39.6%

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

    if 4.6e-221 < t < 9.4999999999999994e-22

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6460.6

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)}, x\right) \]
      6. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right), x\right) \]
      7. metadata-evalN/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + -1}, x\right) \]
      9. lower-/.f6415.4

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

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

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}}, x\right) \]
    11. Simplified34.1%

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

Alternative 13: 62.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a - t}, -x, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1500000000000001e-176 or 1.55e8 < y

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      4. div-invN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{1}{a - t} \cdot \left(z - t\right)\right) \cdot y} \]
      9. lower-*.f6473.5

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
      14. lower-/.f6473.6

        \[\leadsto \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    7. Applied egg-rr73.6%

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

    if -1.1500000000000001e-176 < y < 1.55e8

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 70.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 2.6:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1999999999999998e-8 or 2.60000000000000009 < a

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999998e-8 < a < 2.60000000000000009

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{x - y}{t}} + y \]
      3. div-subN/A

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

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

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

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

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

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

Alternative 15: 69.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 2.7:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.1999999999999998e-8 or 2.7000000000000002 < a

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

    if -2.1999999999999998e-8 < a < 2.7000000000000002

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{y + \frac{z \cdot \left(x - y\right)}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(x - y\right)}{t} + y} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{z \cdot \frac{x - y}{t}} + y \]
      3. div-subN/A

        \[\leadsto z \cdot \color{blue}{\left(\frac{x}{t} - \frac{y}{t}\right)} + y \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{x}{t} - \frac{y}{t}, y\right)} \]
      5. div-subN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x - y}{t}}, y\right) \]
      6. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x - y}{t}}, y\right) \]
      7. lower--.f6475.1

        \[\leadsto \mathsf{fma}\left(z, \frac{\color{blue}{x - y}}{t}, y\right) \]
    8. Simplified75.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 60.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+103}:\\ \;\;\;\;x - \frac{z \cdot x}{a}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -7.2e+103)
   (- x (/ (* z x) a))
   (if (<= a 2.1e+139) (fma z (/ (- x y) t) y) (fma (- x) (/ z a) x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -7.2e+103) {
		tmp = x - ((z * x) / a);
	} else if (a <= 2.1e+139) {
		tmp = fma(z, ((x - y) / t), y);
	} else {
		tmp = fma(-x, (z / a), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -7.2e+103)
		tmp = Float64(x - Float64(Float64(z * x) / a));
	elseif (a <= 2.1e+139)
		tmp = fma(z, Float64(Float64(x - y) / t), y);
	else
		tmp = fma(Float64(-x), Float64(z / a), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.2e+103], N[(x - N[(N[(z * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+139], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[((-x) * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+103}:\\
\;\;\;\;x - \frac{z \cdot x}{a}\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.20000000000000033e103

    1. Initial program 71.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t} + 1\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot x + 1 \cdot x} \]
      3. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right)} \cdot x + 1 \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t} \cdot x\right)\right)} + 1 \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + 1 \cdot x \]
      6. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(z - t\right)}{a - t}}\right)\right) + 1 \cdot x \]
      7. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot x}}{a - t}\right)\right) + 1 \cdot x \]
      8. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right) \cdot \frac{x}{a - t}}\right)\right) + 1 \cdot x \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

        \[\leadsto \left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right) + \color{blue}{x} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right)} \]
      12. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t} + \left(\mathsf{neg}\left(a\right)\right)}, x\right) \]
      19. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6466.0

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{t + \color{blue}{\left(-a\right)}}, x\right) \]
    5. Simplified66.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{x}{t + \left(-a\right)}, x\right)} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot z}{a}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      4. lower-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      5. lower-*.f6464.0

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
    8. Simplified64.0%

      \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]

    if -7.20000000000000033e103 < a < 2.0999999999999999e139

    1. Initial program 68.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-subN/A

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t} + y} \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} + y \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t}\right)\right) + y \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - a}{t}}\right)\right) + y \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - a}{t}} + y \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - a}{t} + y \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - a}{t}, y\right)} \]
    5. Simplified67.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{y + \frac{z \cdot \left(x - y\right)}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(x - y\right)}{t} + y} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{z \cdot \frac{x - y}{t}} + y \]
      3. div-subN/A

        \[\leadsto z \cdot \color{blue}{\left(\frac{x}{t} - \frac{y}{t}\right)} + y \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{x}{t} - \frac{y}{t}, y\right)} \]
      5. div-subN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x - y}{t}}, y\right) \]
      6. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x - y}{t}}, y\right) \]
      7. lower--.f6463.0

        \[\leadsto \mathsf{fma}\left(z, \frac{\color{blue}{x - y}}{t}, y\right) \]
    8. Simplified63.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)} \]

    if 2.0999999999999999e139 < a

    1. Initial program 77.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t} + 1\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot x + 1 \cdot x} \]
      3. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right)} \cdot x + 1 \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t} \cdot x\right)\right)} + 1 \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + 1 \cdot x \]
      6. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(z - t\right)}{a - t}}\right)\right) + 1 \cdot x \]
      7. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot x}}{a - t}\right)\right) + 1 \cdot x \]
      8. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right) \cdot \frac{x}{a - t}}\right)\right) + 1 \cdot x \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

        \[\leadsto \left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right) + \color{blue}{x} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right)} \]
      12. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t} + \left(\mathsf{neg}\left(a\right)\right)}, x\right) \]
      19. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6453.9

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{t + \color{blue}{\left(-a\right)}}, x\right) \]
    5. Simplified53.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{x}{t + \left(-a\right)}, x\right)} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot z}{a}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      3. lower--.f64N/A

        \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
      4. lower-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      5. lower-*.f6449.3

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
    8. Simplified49.3%

      \[\leadsto \color{blue}{x - \frac{x \cdot z}{a}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{x \cdot z}}{a} \]
      2. lift-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{x \cdot z}{a}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\frac{x \cdot z}{a}\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot z}{a}\right)\right) + x} \]
      5. lift-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot z}{a}}\right)\right) + x \]
      6. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{x \cdot z}}{a}\right)\right) + x \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z}{a}}\right)\right) + x \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{z}{a}} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(x\right), \frac{z}{a}, x\right)} \]
      10. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(x\right)}, \frac{z}{a}, x\right) \]
      11. lower-/.f6453.9

        \[\leadsto \mathsf{fma}\left(-x, \color{blue}{\frac{z}{a}}, x\right) \]
    10. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-x, \frac{z}{a}, x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+103}:\\ \;\;\;\;x - \frac{z \cdot x}{a}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 45.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ z t)))))
   (if (<= t -7.2e-42) t_1 (if (<= t 7.6e-36) (* z (/ (- y x) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double tmp;
	if (t <= -7.2e-42) {
		tmp = t_1;
	} else if (t <= 7.6e-36) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (1.0d0 - (z / t))
    if (t <= (-7.2d-42)) then
        tmp = t_1
    else if (t <= 7.6d-36) then
        tmp = z * ((y - x) / a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double tmp;
	if (t <= -7.2e-42) {
		tmp = t_1;
	} else if (t <= 7.6e-36) {
		tmp = z * ((y - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (1.0 - (z / t))
	tmp = 0
	if t <= -7.2e-42:
		tmp = t_1
	elif t <= 7.6e-36:
		tmp = z * ((y - x) / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(z / t)))
	tmp = 0.0
	if (t <= -7.2e-42)
		tmp = t_1;
	elseif (t <= 7.6e-36)
		tmp = Float64(z * Float64(Float64(y - x) / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (1.0 - (z / t));
	tmp = 0.0;
	if (t <= -7.2e-42)
		tmp = t_1;
	elseif (t <= 7.6e-36)
		tmp = z * ((y - x) / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-42], t$95$1, If[LessEqual[t, 7.6e-36], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.2000000000000004e-42 or 7.59999999999999942e-36 < t

    1. Initial program 54.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{a - t} \]
      3. lower--.f64N/A

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6441.4

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
    5. Simplified41.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right)} \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{t}\right)} \]
      5. div-subN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}\right) \]
      6. sub-negN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \color{blue}{-1}\right)\right) \]
      9. distribute-lft-inN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t} + -1 \cdot -1\right)} \]
      10. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \frac{z}{t} + \color{blue}{1}\right) \]
      11. +-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      13. mul-1-negN/A

        \[\leadsto y \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}\right) \]
      14. unsub-negN/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      15. lower--.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6448.8

        \[\leadsto y \cdot \left(1 - \color{blue}{\frac{z}{t}}\right) \]
    8. Simplified48.8%

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{t}\right)} \]

    if -7.2000000000000004e-42 < t < 7.59999999999999942e-36

    1. Initial program 91.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    4. Step-by-step derivation
      1. div-subN/A

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{a - t} \]
      5. lower--.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y - x\right)}}{a - t} \]
      6. lower--.f6454.8

        \[\leadsto \frac{z \cdot \left(y - x\right)}{\color{blue}{a - t}} \]
    5. Simplified54.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    6. Taylor expanded in a around inf

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]
      3. lower-/.f64N/A

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a}} \]
      4. lower--.f6445.7

        \[\leadsto z \cdot \frac{\color{blue}{y - x}}{a} \]
    8. Simplified45.7%

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 42.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ z t)))))
   (if (<= t -8.6e-55) t_1 (if (<= t 8e-36) (* y (/ z (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double tmp;
	if (t <= -8.6e-55) {
		tmp = t_1;
	} else if (t <= 8e-36) {
		tmp = y * (z / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (1.0d0 - (z / t))
    if (t <= (-8.6d-55)) then
        tmp = t_1
    else if (t <= 8d-36) then
        tmp = y * (z / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double tmp;
	if (t <= -8.6e-55) {
		tmp = t_1;
	} else if (t <= 8e-36) {
		tmp = y * (z / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (1.0 - (z / t))
	tmp = 0
	if t <= -8.6e-55:
		tmp = t_1
	elif t <= 8e-36:
		tmp = y * (z / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(z / t)))
	tmp = 0.0
	if (t <= -8.6e-55)
		tmp = t_1;
	elseif (t <= 8e-36)
		tmp = Float64(y * Float64(z / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (1.0 - (z / t));
	tmp = 0.0;
	if (t <= -8.6e-55)
		tmp = t_1;
	elseif (t <= 8e-36)
		tmp = y * (z / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-55], t$95$1, If[LessEqual[t, 8e-36], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.60000000000000021e-55 or 7.9999999999999995e-36 < t

    1. Initial program 55.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{a - t} \]
      3. lower--.f64N/A

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6441.0

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
    5. Simplified41.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right)} \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{t}\right)} \]
      5. div-subN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}\right) \]
      6. sub-negN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \color{blue}{-1}\right)\right) \]
      9. distribute-lft-inN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t} + -1 \cdot -1\right)} \]
      10. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \frac{z}{t} + \color{blue}{1}\right) \]
      11. +-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      13. mul-1-negN/A

        \[\leadsto y \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}\right) \]
      14. unsub-negN/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      15. lower--.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6448.2

        \[\leadsto y \cdot \left(1 - \color{blue}{\frac{z}{t}}\right) \]
    8. Simplified48.2%

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{t}\right)} \]

    if -8.60000000000000021e-55 < t < 7.9999999999999995e-36

    1. Initial program 91.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(\frac{y}{a - t} - \frac{x}{a - t}\right)} \]
    4. Step-by-step derivation
      1. div-subN/A

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{a - t} \]
      5. lower--.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\left(y - x\right)}}{a - t} \]
      6. lower--.f6455.8

        \[\leadsto \frac{z \cdot \left(y - x\right)}{\color{blue}{a - t}} \]
    5. Simplified55.8%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a - t}} \]
    6. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    7. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
      3. lower-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{z}{a - t}} \]
      4. lower--.f6442.8

        \[\leadsto y \cdot \frac{z}{\color{blue}{a - t}} \]
    8. Simplified42.8%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 40.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{-72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 155000000:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- 1.0 (/ z t)))))
   (if (<= y -2.5e-72) t_1 (if (<= y 155000000.0) (fma x (/ z t) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (1.0 - (z / t));
	double tmp;
	if (y <= -2.5e-72) {
		tmp = t_1;
	} else if (y <= 155000000.0) {
		tmp = fma(x, (z / t), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(1.0 - Float64(z / t)))
	tmp = 0.0
	if (y <= -2.5e-72)
		tmp = t_1;
	elseif (y <= 155000000.0)
		tmp = fma(x, Float64(z / t), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-72], t$95$1, If[LessEqual[y, 155000000.0], N[(x * N[(z / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4999999999999998e-72 or 1.55e8 < y

    1. Initial program 66.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{a - t} \]
      3. lower--.f64N/A

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6456.7

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
    5. Simplified56.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)} \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right)} \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{t}\right)} \]
      5. div-subN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}\right) \]
      6. sub-negN/A

        \[\leadsto y \cdot \left(-1 \cdot \color{blue}{\left(\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)\right)}\right) \]
      7. *-inversesN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \left(\frac{z}{t} + \color{blue}{-1}\right)\right) \]
      9. distribute-lft-inN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t} + -1 \cdot -1\right)} \]
      10. metadata-evalN/A

        \[\leadsto y \cdot \left(-1 \cdot \frac{z}{t} + \color{blue}{1}\right) \]
      11. +-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      13. mul-1-negN/A

        \[\leadsto y \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}\right) \]
      14. unsub-negN/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      15. lower--.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
      16. lower-/.f6452.2

        \[\leadsto y \cdot \left(1 - \color{blue}{\frac{z}{t}}\right) \]
    8. Simplified52.2%

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{t}\right)} \]

    if -2.4999999999999998e-72 < y < 1.55e8

    1. Initial program 74.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t} + 1\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot x + 1 \cdot x} \]
      3. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right)} \cdot x + 1 \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t} \cdot x\right)\right)} + 1 \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + 1 \cdot x \]
      6. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(z - t\right)}{a - t}}\right)\right) + 1 \cdot x \]
      7. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot x}}{a - t}\right)\right) + 1 \cdot x \]
      8. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right) \cdot \frac{x}{a - t}}\right)\right) + 1 \cdot x \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

        \[\leadsto \left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right) + \color{blue}{x} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right)} \]
      12. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t} + \left(\mathsf{neg}\left(a\right)\right)}, x\right) \]
      19. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6461.4

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{t + \color{blue}{\left(-a\right)}}, x\right) \]
    5. Simplified61.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{x}{t + \left(-a\right)}, x\right)} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + \frac{x \cdot \left(z - t\right)}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{x \cdot \left(z - t\right)}{t} + x} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{z - t}{t}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z - t}{t}, x\right)} \]
      4. div-subN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} - \frac{t}{t}}, x\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)}, x\right) \]
      6. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right), x\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \color{blue}{-1}, x\right) \]
      8. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + -1}, x\right) \]
      9. lower-/.f6419.2

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}} + -1, x\right) \]
    8. Simplified19.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{t} + -1, x\right)} \]
    9. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}}, x\right) \]
    10. Step-by-step derivation
      1. lower-/.f6431.1

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}}, x\right) \]
    11. Simplified31.1%

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}}, x\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 33.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\ \;\;\;\;\frac{z \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -9.2e-55) y (if (<= t 1.6e-25) (/ (* z y) a) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.2e-55) {
		tmp = y;
	} else if (t <= 1.6e-25) {
		tmp = (z * y) / a;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-9.2d-55)) then
        tmp = y
    else if (t <= 1.6d-25) then
        tmp = (z * y) / a
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -9.2e-55) {
		tmp = y;
	} else if (t <= 1.6e-25) {
		tmp = (z * y) / a;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -9.2e-55:
		tmp = y
	elif t <= 1.6e-25:
		tmp = (z * y) / a
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -9.2e-55)
		tmp = y;
	elseif (t <= 1.6e-25)
		tmp = Float64(Float64(z * y) / a);
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -9.2e-55)
		tmp = y;
	elseif (t <= 1.6e-25)
		tmp = (z * y) / a;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e-55], y, If[LessEqual[t, 1.6e-25], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{z \cdot y}{a}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.20000000000000046e-55 or 1.6000000000000001e-25 < t

    1. Initial program 54.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6434.5

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Simplified34.5%

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(y - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6442.6

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr42.6%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    8. Step-by-step derivation
      1. +-inversesN/A

        \[\leadsto y - \color{blue}{0} \]
      2. --rgt-identity42.6

        \[\leadsto \color{blue}{y} \]
    9. Applied egg-rr42.6%

      \[\leadsto \color{blue}{y} \]

    if -9.20000000000000046e-55 < t < 1.6000000000000001e-25

    1. Initial program 91.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{a - t} \]
      3. lower--.f64N/A

        \[\leadsto \frac{y \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      4. lower--.f6444.2

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
    5. Simplified44.2%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
      3. lower-*.f6431.3

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a} \]
    8. Simplified31.3%

      \[\leadsto \color{blue}{\frac{z \cdot y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 28.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{-72}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-52}:\\ \;\;\;\;\frac{z \cdot x}{t}\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -2.2e-72) y (if (<= y 3.3e-52) (/ (* z x) t) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -2.2e-72) {
		tmp = y;
	} else if (y <= 3.3e-52) {
		tmp = (z * x) / t;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-2.2d-72)) then
        tmp = y
    else if (y <= 3.3d-52) then
        tmp = (z * x) / t
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -2.2e-72) {
		tmp = y;
	} else if (y <= 3.3e-52) {
		tmp = (z * x) / t;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -2.2e-72:
		tmp = y
	elif y <= 3.3e-52:
		tmp = (z * x) / t
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -2.2e-72)
		tmp = y;
	elseif (y <= 3.3e-52)
		tmp = Float64(Float64(z * x) / t);
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -2.2e-72)
		tmp = y;
	elseif (y <= 3.3e-52)
		tmp = (z * x) / t;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.2e-72], y, If[LessEqual[y, 3.3e-52], N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-72}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-52}:\\
\;\;\;\;\frac{z \cdot x}{t}\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.20000000000000002e-72 or 3.29999999999999995e-52 < y

    1. Initial program 68.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6432.1

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Simplified32.1%

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(y - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6438.7

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied egg-rr38.7%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    8. Step-by-step derivation
      1. +-inversesN/A

        \[\leadsto y - \color{blue}{0} \]
      2. --rgt-identity38.7

        \[\leadsto \color{blue}{y} \]
    9. Applied egg-rr38.7%

      \[\leadsto \color{blue}{y} \]

    if -2.20000000000000002e-72 < y < 3.29999999999999995e-52

    1. Initial program 72.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t} + 1\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot x + 1 \cdot x} \]
      3. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right)} \cdot x + 1 \cdot x \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t} \cdot x\right)\right)} + 1 \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + 1 \cdot x \]
      6. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(z - t\right)}{a - t}}\right)\right) + 1 \cdot x \]
      7. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot x}}{a - t}\right)\right) + 1 \cdot x \]
      8. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right) \cdot \frac{x}{a - t}}\right)\right) + 1 \cdot x \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
      10. *-lft-identityN/A

        \[\leadsto \left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right) + \color{blue}{x} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right)} \]
      12. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
      13. distribute-neg-frac2N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      18. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t} + \left(\mathsf{neg}\left(a\right)\right)}, x\right) \]
      19. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
      20. lower-neg.f6460.9

        \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{t + \color{blue}{\left(-a\right)}}, x\right) \]
    5. Simplified60.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{x}{t + \left(-a\right)}, x\right)} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + \frac{x \cdot \left(z - t\right)}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{x \cdot \left(z - t\right)}{t} + x} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{z - t}{t}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z - t}{t}, x\right)} \]
      4. div-subN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} - \frac{t}{t}}, x\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + \left(\mathsf{neg}\left(\frac{t}{t}\right)\right)}, x\right) \]
      6. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right), x\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x, \frac{z}{t} + \color{blue}{-1}, x\right) \]
      8. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t} + -1}, x\right) \]
      9. lower-/.f6421.1

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{z}{t}} + -1, x\right) \]
    8. Simplified21.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{z}{t} + -1, x\right)} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot z}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{z \cdot x}}{t} \]
      3. lower-*.f6428.6

        \[\leadsto \frac{\color{blue}{z \cdot x}}{t} \]
    11. Simplified28.6%

      \[\leadsto \color{blue}{\frac{z \cdot x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 25.0% accurate, 29.0× speedup?

\[\begin{array}{l} \\ y \end{array} \]
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
	return y;
}
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 = y
end function
public static double code(double x, double y, double z, double t, double a) {
	return y;
}
def code(x, y, z, t, a):
	return y
function code(x, y, z, t, a)
	return y
end
function tmp = code(x, y, z, t, a)
	tmp = y;
end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}

\\
y
\end{array}
Derivation
  1. Initial program 69.8%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  4. Step-by-step derivation
    1. lower--.f6423.1

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  5. Simplified23.1%

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  6. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{\left(y - x\right) + x} \]
    3. lift--.f64N/A

      \[\leadsto \color{blue}{\left(y - x\right)} + x \]
    4. associate-+l-N/A

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    5. lower--.f64N/A

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    6. lower--.f6427.9

      \[\leadsto y - \color{blue}{\left(x - x\right)} \]
  7. Applied egg-rr27.9%

    \[\leadsto \color{blue}{y - \left(x - x\right)} \]
  8. Step-by-step derivation
    1. +-inversesN/A

      \[\leadsto y - \color{blue}{0} \]
    2. --rgt-identity27.9

      \[\leadsto \color{blue}{y} \]
  9. Applied egg-rr27.9%

    \[\leadsto \color{blue}{y} \]
  10. Add Preprocessing

Alternative 23: 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.8%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf

    \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
  4. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t} + 1\right)} \]
    2. distribute-rgt-inN/A

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right) \cdot x + 1 \cdot x} \]
    3. mul-1-negN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right)} \cdot x + 1 \cdot x \]
    4. distribute-lft-neg-outN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t} \cdot x\right)\right)} + 1 \cdot x \]
    5. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) + 1 \cdot x \]
    6. associate-/l*N/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(z - t\right)}{a - t}}\right)\right) + 1 \cdot x \]
    7. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot x}}{a - t}\right)\right) + 1 \cdot x \]
    8. associate-/l*N/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z - t\right) \cdot \frac{x}{a - t}}\right)\right) + 1 \cdot x \]
    9. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right)} + 1 \cdot x \]
    10. *-lft-identityN/A

      \[\leadsto \left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{x}{a - t}\right)\right) + \color{blue}{x} \]
    11. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right)} \]
    12. lower--.f64N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \mathsf{neg}\left(\frac{x}{a - t}\right), x\right) \]
    13. distribute-neg-frac2N/A

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
    14. lower-/.f64N/A

      \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{x}{\mathsf{neg}\left(\left(a - t\right)\right)}}, x\right) \]
    15. sub-negN/A

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)}, x\right) \]
    16. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}\right)}, x\right) \]
    17. distribute-neg-inN/A

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
    18. remove-double-negN/A

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t} + \left(\mathsf{neg}\left(a\right)\right)}, x\right) \]
    19. lower-+.f64N/A

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{\color{blue}{t + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
    20. lower-neg.f6437.0

      \[\leadsto \mathsf{fma}\left(z - t, \frac{x}{t + \color{blue}{\left(-a\right)}}, x\right) \]
  5. Simplified37.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{x}{t + \left(-a\right)}, x\right)} \]
  6. Taylor expanded in t around inf

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  7. Step-by-step derivation
    1. distribute-rgt1-inN/A

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-evalN/A

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.6

      \[\leadsto \color{blue}{0} \]
  8. Simplified2.6%

    \[\leadsto \color{blue}{0} \]
  9. Add Preprocessing

Developer Target 1: 86.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
   (if (< a -1.6153062845442575e-142)
     t_1
     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
    if (a < (-1.6153062845442575d-142)) then
        tmp = t_1
    else if (a < 3.774403170083174d-182) then
        tmp = y - ((z / t) * (y - x))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
	tmp = 0
	if a < -1.6153062845442575e-142:
		tmp = t_1
	elif a < 3.774403170083174e-182:
		tmp = y - ((z / t) * (y - x))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = y - ((z / t) * (y - x));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024207 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))