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

Percentage Accurate: 67.7% → 88.9%
Time: 12.9s
Alternatives: 12
Speedup: 0.8×

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 12 alternatives:

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

Initial Program: 67.7% 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.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\ \mathbf{if}\;t \leq -1.36 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+107}:\\ \;\;\;\;\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) t) (- z a) y)))
   (if (<= t -1.36e+141)
     t_1
     (if (<= t 9e+107) (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) / t), (z - a), y);
	double tmp;
	if (t <= -1.36e+141) {
		tmp = t_1;
	} else if (t <= 9e+107) {
		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(Float64(x - y) / t), Float64(z - a), y)
	tmp = 0.0
	if (t <= -1.36e+141)
		tmp = t_1;
	elseif (t <= 9e+107)
		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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.36e+141], t$95$1, If[LessEqual[t, 9e+107], 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(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{+107}:\\
\;\;\;\;\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 < -1.36e141 or 9e107 < t

    1. Initial program 33.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 y + \color{blue}{\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 + -1 \cdot \color{blue}{\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 \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{\color{blue}{t}} \]
      4. +-commutativeN/A

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

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

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

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

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

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

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

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

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

    if -1.36e141 < t < 9e107

    1. Initial program 83.1%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(a - t\right)\right), \left(y - x\right), x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(a, t\right)\right), \left(y - x\right), x\right) \]
      8. --lowering--.f6492.5%

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

      \[\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: 62.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+136}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{+104}:\\ \;\;\;\;\mathsf{fma}\left(t - z, \frac{x}{a - t}, x\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-76}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-55}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t} + -1, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.85e+136)
   (* y (- 1.0 (/ z t)))
   (if (<= t -7.6e+104)
     (fma (- t z) (/ x (- a t)) x)
     (if (<= t -1.45e-76)
       (/ (* y (- z t)) (- a t))
       (if (<= t 2.5e-55)
         (fma z (/ (- y x) a) x)
         (if (<= t 1.8e+118)
           (fma (- x y) (+ (/ z t) -1.0) x)
           (fma a (/ (- y x) t) y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.85e+136) {
		tmp = y * (1.0 - (z / t));
	} else if (t <= -7.6e+104) {
		tmp = fma((t - z), (x / (a - t)), x);
	} else if (t <= -1.45e-76) {
		tmp = (y * (z - t)) / (a - t);
	} else if (t <= 2.5e-55) {
		tmp = fma(z, ((y - x) / a), x);
	} else if (t <= 1.8e+118) {
		tmp = fma((x - y), ((z / t) + -1.0), x);
	} else {
		tmp = fma(a, ((y - x) / t), y);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.85e+136)
		tmp = Float64(y * Float64(1.0 - Float64(z / t)));
	elseif (t <= -7.6e+104)
		tmp = fma(Float64(t - z), Float64(x / Float64(a - t)), x);
	elseif (t <= -1.45e-76)
		tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t));
	elseif (t <= 2.5e-55)
		tmp = fma(z, Float64(Float64(y - x) / a), x);
	elseif (t <= 1.8e+118)
		tmp = fma(Float64(x - y), Float64(Float64(z / t) + -1.0), x);
	else
		tmp = fma(a, Float64(Float64(y - x) / t), y);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.85e+136], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.6e+104], N[(N[(t - z), $MachinePrecision] * N[(x / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, -1.45e-76], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-55], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.8e+118], N[(N[(x - y), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+136}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.85000000000000005e136

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
      9. unsub-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
      18. /-lowering-/.f6452.2%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
      13. /-lowering-/.f6476.4%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
    8. Simplified76.4%

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

    if -1.85000000000000005e136 < t < -7.59999999999999938e104

    1. Initial program 45.1%

      \[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 \left(-1 \cdot \frac{z - t}{a - t} + \color{blue}{1}\right) \]
      2. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(z - t\right)\right) \cdot \frac{x}{a - t} + x \]
      12. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(-1 \cdot \left(z - t\right)\right), \color{blue}{\left(\frac{x}{a - t}\right)}, x\right) \]
      13. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(t - z\right), \left(\frac{x}{a - t}\right), x\right) \]
      19. --lowering--.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{x}}{a - t}\right), x\right) \]
      20. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(x, \color{blue}{\left(a - t\right)}\right), x\right) \]
      21. --lowering--.f6499.8%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified99.8%

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

    if -7.59999999999999938e104 < t < -1.4500000000000001e-76

    1. Initial program 80.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), \left(\color{blue}{a} - t\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \left(a - t\right)\right) \]
      4. --lowering--.f6461.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right) \]
    5. Simplified61.7%

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

    if -1.4500000000000001e-76 < t < 2.5000000000000001e-55

    1. Initial program 91.5%

      \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
      2. associate-/l*N/A

        \[\leadsto z \cdot \frac{y - x}{a} + x \]
      3. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
      5. --lowering--.f6482.7%

        \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
    5. Simplified82.7%

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

    if 2.5000000000000001e-55 < t < 1.8e118

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
      9. unsub-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
      18. /-lowering-/.f6450.8%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified50.8%

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

    if 1.8e118 < t

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
      11. distribute-neg-inN/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{t}}{a - t}\right), x\right) \]
      12. unsub-negN/A

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

        \[\leadsto \mathsf{fma.f64}\left(\left(x - y\right), \left(\frac{t}{a - t}\right), x\right) \]
      14. --lowering--.f64N/A

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - t\right)}\right), x\right) \]
      16. --lowering--.f6444.9%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified44.9%

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

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

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

        \[\leadsto \left(x + \left(-1 \cdot x - -1 \cdot y\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      3. sub-negN/A

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

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

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

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

        \[\leadsto \left(x + \left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      8. sub-negN/A

        \[\leadsto \left(x + \left(y - x\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      9. sub-negN/A

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

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

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

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

        \[\leadsto \left(\left(-1 + 1\right) \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      14. metadata-evalN/A

        \[\leadsto \left(0 \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      15. mul0-lftN/A

        \[\leadsto \left(0 + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      16. *-lft-identityN/A

        \[\leadsto \left(0 + 1 \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      17. metadata-evalN/A

        \[\leadsto \left(0 + \left(\mathsf{neg}\left(-1\right)\right) \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      18. cancel-sign-sub-invN/A

        \[\leadsto \left(0 - -1 \cdot y\right) + \color{blue}{-1} \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      19. neg-sub0N/A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+136}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{+104}:\\ \;\;\;\;\mathsf{fma}\left(t - z, \frac{x}{a - t}, x\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-76}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-55}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t} + -1, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 61.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.5e134

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
      9. unsub-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
      18. /-lowering-/.f6452.2%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
      13. /-lowering-/.f6476.4%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
    8. Simplified76.4%

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

    if -6.5e134 < t < -6.7999999999999994e104

    1. Initial program 45.1%

      \[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 \left(-1 \cdot \frac{z - t}{a - t} + \color{blue}{1}\right) \]
      2. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-1 \cdot \left(z - t\right)\right) \cdot \frac{x}{a - t} + x \]
      12. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\left(-1 \cdot \left(z - t\right)\right), \color{blue}{\left(\frac{x}{a - t}\right)}, x\right) \]
      13. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(t - z\right), \left(\frac{x}{a - t}\right), x\right) \]
      19. --lowering--.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \left(\frac{\color{blue}{x}}{a - t}\right), x\right) \]
      20. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(x, \color{blue}{\left(a - t\right)}\right), x\right) \]
      21. --lowering--.f6499.8%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(t, z\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified99.8%

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

    if -6.7999999999999994e104 < t < -4.20000000000000031e-77

    1. Initial program 80.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), \left(\color{blue}{a} - t\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \left(a - t\right)\right) \]
      4. --lowering--.f6461.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right) \]
    5. Simplified61.7%

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

    if -4.20000000000000031e-77 < t < 2.79999999999999989e88

    1. Initial program 87.4%

      \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
      2. associate-/l*N/A

        \[\leadsto z \cdot \frac{y - x}{a} + x \]
      3. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
      5. --lowering--.f6470.6%

        \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
    5. Simplified70.6%

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

    if 2.79999999999999989e88 < t

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
      11. distribute-neg-inN/A

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{t}}{a - t}\right), x\right) \]
      12. unsub-negN/A

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

        \[\leadsto \mathsf{fma.f64}\left(\left(x - y\right), \left(\frac{t}{a - t}\right), x\right) \]
      14. --lowering--.f64N/A

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - t\right)}\right), x\right) \]
      16. --lowering--.f6446.1%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified46.1%

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

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

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

        \[\leadsto \left(x + \left(-1 \cdot x - -1 \cdot y\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      3. sub-negN/A

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

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

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

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

        \[\leadsto \left(x + \left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      8. sub-negN/A

        \[\leadsto \left(x + \left(y - x\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      9. sub-negN/A

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

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

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

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

        \[\leadsto \left(\left(-1 + 1\right) \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      14. metadata-evalN/A

        \[\leadsto \left(0 \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      15. mul0-lftN/A

        \[\leadsto \left(0 + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      16. *-lft-identityN/A

        \[\leadsto \left(0 + 1 \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      17. metadata-evalN/A

        \[\leadsto \left(0 + \left(\mathsf{neg}\left(-1\right)\right) \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      18. cancel-sign-sub-invN/A

        \[\leadsto \left(0 - -1 \cdot y\right) + \color{blue}{-1} \cdot \frac{a \cdot \left(x - y\right)}{t} \]
      19. neg-sub0N/A

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

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

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

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

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

Alternative 4: 61.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.7 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.6999999999999997e134

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
      9. unsub-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
      18. /-lowering-/.f6452.2%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
    5. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
      13. /-lowering-/.f6476.4%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
    8. Simplified76.4%

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

    if -6.6999999999999997e134 < t < -8.1999999999999998e107

    1. Initial program 36.0%

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(z \cdot \left(y - x\right)\right), \color{blue}{a}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(y - x\right)\right), a\right)\right) \]
      3. --lowering--.f6435.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, x\right)\right), a\right)\right) \]
    5. Simplified35.0%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \color{blue}{y}\right), a\right)\right) \]
    7. Step-by-step derivation
      1. Simplified84.4%

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

      if -8.1999999999999998e107 < t < -7.5000000000000006e-77

      1. Initial program 80.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. /-lowering-/.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(z - t\right)\right), \left(\color{blue}{a} - t\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \left(a - t\right)\right) \]
        4. --lowering--.f6460.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right) \]
      5. Simplified60.1%

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

      if -7.5000000000000006e-77 < t < 3.4000000000000002e87

      1. Initial program 87.4%

        \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
        2. associate-/l*N/A

          \[\leadsto z \cdot \frac{y - x}{a} + x \]
        3. accelerator-lowering-fma.f64N/A

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

          \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
        5. --lowering--.f6470.6%

          \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
      5. Simplified70.6%

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

      if 3.4000000000000002e87 < t

      1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
        10. +-commutativeN/A

          \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
        11. distribute-neg-inN/A

          \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{t}}{a - t}\right), x\right) \]
        12. unsub-negN/A

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

          \[\leadsto \mathsf{fma.f64}\left(\left(x - y\right), \left(\frac{t}{a - t}\right), x\right) \]
        14. --lowering--.f64N/A

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

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - t\right)}\right), x\right) \]
        16. --lowering--.f6446.1%

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
      5. Simplified46.1%

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

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

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

          \[\leadsto \left(x + \left(-1 \cdot x - -1 \cdot y\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        3. sub-negN/A

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

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

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

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

          \[\leadsto \left(x + \left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        8. sub-negN/A

          \[\leadsto \left(x + \left(y - x\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        9. sub-negN/A

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

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

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

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

          \[\leadsto \left(\left(-1 + 1\right) \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        14. metadata-evalN/A

          \[\leadsto \left(0 \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        15. mul0-lftN/A

          \[\leadsto \left(0 + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        16. *-lft-identityN/A

          \[\leadsto \left(0 + 1 \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        17. metadata-evalN/A

          \[\leadsto \left(0 + \left(\mathsf{neg}\left(-1\right)\right) \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        18. cancel-sign-sub-invN/A

          \[\leadsto \left(0 - -1 \cdot y\right) + \color{blue}{-1} \cdot \frac{a \cdot \left(x - y\right)}{t} \]
        19. neg-sub0N/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)} \]
    8. Recombined 5 regimes into one program.
    9. Final simplification69.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.7 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+107}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 5: 75.4% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\ \mathbf{if}\;t \leq -1.4 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-208}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-67}:\\ \;\;\;\;\mathsf{fma}\left(z, \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) t) (- z a) y)))
       (if (<= t -1.4e+133)
         t_1
         (if (<= t -5.6e-208)
           (fma (/ (- z t) (- a t)) y x)
           (if (<= t 1.6e-67) (fma z (/ (- y x) a) x) t_1)))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma(((x - y) / t), (z - a), y);
    	double tmp;
    	if (t <= -1.4e+133) {
    		tmp = t_1;
    	} else if (t <= -5.6e-208) {
    		tmp = fma(((z - t) / (a - t)), y, x);
    	} else if (t <= 1.6e-67) {
    		tmp = fma(z, ((y - x) / a), x);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y)
    	tmp = 0.0
    	if (t <= -1.4e+133)
    		tmp = t_1;
    	elseif (t <= -5.6e-208)
    		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), y, x);
    	elseif (t <= 1.6e-67)
    		tmp = fma(z, 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.4e+133], t$95$1, If[LessEqual[t, -5.6e-208], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 1.6e-67], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
    \mathbf{if}\;t \leq -1.4 \cdot 10^{+133}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq -5.6 \cdot 10^{-208}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
    
    \mathbf{elif}\;t \leq 1.6 \cdot 10^{-67}:\\
    \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.40000000000000008e133 or 1.60000000000000011e-67 < t

      1. Initial program 46.0%

        \[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 y + \color{blue}{\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 + -1 \cdot \color{blue}{\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 \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{\color{blue}{t}} \]
        4. +-commutativeN/A

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

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

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

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

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

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

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

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

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

      if -1.40000000000000008e133 < t < -5.60000000000000003e-208

      1. Initial program 80.9%

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

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

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

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

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

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

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(a - t\right)\right), \left(y - x\right), x\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(a, t\right)\right), \left(y - x\right), x\right) \]
        8. --lowering--.f6490.5%

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(a, t\right)\right), \mathsf{\_.f64}\left(y, \color{blue}{x}\right), x\right) \]
      4. Applied egg-rr90.5%

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(a, t\right)\right), \color{blue}{y}, x\right) \]
      6. Step-by-step derivation
        1. Simplified75.8%

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

        if -5.60000000000000003e-208 < t < 1.60000000000000011e-67

        1. Initial program 92.9%

          \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
          2. associate-/l*N/A

            \[\leadsto z \cdot \frac{y - x}{a} + x \]
          3. accelerator-lowering-fma.f64N/A

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

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
          5. --lowering--.f6489.5%

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
        5. Simplified89.5%

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

      Alternative 6: 72.9% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\ \mathbf{if}\;t \leq -3 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(z, \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) t) (- z a) y)))
         (if (<= t -3e+54) t_1 (if (<= t 5e-66) (fma z (/ (- y x) a) x) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = fma(((x - y) / t), (z - a), y);
      	double tmp;
      	if (t <= -3e+54) {
      		tmp = t_1;
      	} else if (t <= 5e-66) {
      		tmp = fma(z, ((y - x) / a), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y)
      	tmp = 0.0
      	if (t <= -3e+54)
      		tmp = t_1;
      	elseif (t <= 5e-66)
      		tmp = fma(z, 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -3e+54], t$95$1, If[LessEqual[t, 5e-66], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
      \mathbf{if}\;t \leq -3 \cdot 10^{+54}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 5 \cdot 10^{-66}:\\
      \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -2.9999999999999999e54 or 4.99999999999999962e-66 < t

        1. Initial program 47.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 y + \color{blue}{\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 + -1 \cdot \color{blue}{\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 \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{\color{blue}{t}} \]
          4. +-commutativeN/A

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

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

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

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

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

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

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

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

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

        if -2.9999999999999999e54 < t < 4.99999999999999962e-66

        1. Initial program 90.7%

          \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
          2. associate-/l*N/A

            \[\leadsto z \cdot \frac{y - x}{a} + x \]
          3. accelerator-lowering-fma.f64N/A

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

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
          5. --lowering--.f6475.5%

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
        5. Simplified75.5%

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

      Alternative 7: 62.2% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= t -6.5e+134)
         (* y (- 1.0 (/ z t)))
         (if (<= t 6.5e+87) (fma z (/ (- y x) a) x) (fma a (/ (- y x) t) y))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -6.5e+134) {
      		tmp = y * (1.0 - (z / t));
      	} else if (t <= 6.5e+87) {
      		tmp = fma(z, ((y - x) / a), x);
      	} else {
      		tmp = fma(a, ((y - x) / t), y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= -6.5e+134)
      		tmp = Float64(y * Float64(1.0 - Float64(z / t)));
      	elseif (t <= 6.5e+87)
      		tmp = fma(z, Float64(Float64(y - x) / a), x);
      	else
      		tmp = fma(a, Float64(Float64(y - x) / t), y);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+87], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\
      \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
      
      \mathbf{elif}\;t \leq 6.5 \cdot 10^{+87}:\\
      \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -6.5e134

        1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
          9. unsub-negN/A

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

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
          16. +-commutativeN/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
          17. +-lowering-+.f64N/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
          18. /-lowering-/.f6452.2%

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
        5. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
          11. unsub-negN/A

            \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
          12. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
          13. /-lowering-/.f6476.4%

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
        8. Simplified76.4%

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

        if -6.5e134 < t < 6.5000000000000002e87

        1. Initial program 84.1%

          \[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 \frac{z \cdot \left(y - x\right)}{a} + \color{blue}{x} \]
          2. associate-/l*N/A

            \[\leadsto z \cdot \frac{y - x}{a} + x \]
          3. accelerator-lowering-fma.f64N/A

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

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\left(y - x\right), \color{blue}{a}\right), x\right) \]
          5. --lowering--.f6463.8%

            \[\leadsto \mathsf{fma.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), a\right), x\right) \]
        5. Simplified63.8%

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

        if 6.5000000000000002e87 < t

        1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
          10. +-commutativeN/A

            \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
          11. distribute-neg-inN/A

            \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{t}}{a - t}\right), x\right) \]
          12. unsub-negN/A

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

            \[\leadsto \mathsf{fma.f64}\left(\left(x - y\right), \left(\frac{t}{a - t}\right), x\right) \]
          14. --lowering--.f64N/A

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

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - t\right)}\right), x\right) \]
          16. --lowering--.f6446.1%

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
        5. Simplified46.1%

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

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

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

            \[\leadsto \left(x + \left(-1 \cdot x - -1 \cdot y\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          3. sub-negN/A

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

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

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

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

            \[\leadsto \left(x + \left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          8. sub-negN/A

            \[\leadsto \left(x + \left(y - x\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          9. sub-negN/A

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

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

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

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

            \[\leadsto \left(\left(-1 + 1\right) \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          14. metadata-evalN/A

            \[\leadsto \left(0 \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          15. mul0-lftN/A

            \[\leadsto \left(0 + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          16. *-lft-identityN/A

            \[\leadsto \left(0 + 1 \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          17. metadata-evalN/A

            \[\leadsto \left(0 + \left(\mathsf{neg}\left(-1\right)\right) \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          18. cancel-sign-sub-invN/A

            \[\leadsto \left(0 - -1 \cdot y\right) + \color{blue}{-1} \cdot \frac{a \cdot \left(x - y\right)}{t} \]
          19. neg-sub0N/A

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

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

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

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

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

      Alternative 8: 55.4% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= t -8e+134)
         (* y (- 1.0 (/ z t)))
         (if (<= t 1.2e+53) (fma y (/ z a) x) (fma a (/ (- y x) t) y))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -8e+134) {
      		tmp = y * (1.0 - (z / t));
      	} else if (t <= 1.2e+53) {
      		tmp = fma(y, (z / a), x);
      	} else {
      		tmp = fma(a, ((y - x) / t), y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= -8e+134)
      		tmp = Float64(y * Float64(1.0 - Float64(z / t)));
      	elseif (t <= 1.2e+53)
      		tmp = fma(y, Float64(z / a), x);
      	else
      		tmp = fma(a, Float64(Float64(y - x) / t), y);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+53], N[(y * N[(z / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -8 \cdot 10^{+134}:\\
      \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
      
      \mathbf{elif}\;t \leq 1.2 \cdot 10^{+53}:\\
      \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -7.99999999999999937e134

        1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
          9. unsub-negN/A

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

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
          16. +-commutativeN/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
          17. +-lowering-+.f64N/A

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
          18. /-lowering-/.f6452.2%

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
        5. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
          11. unsub-negN/A

            \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
          12. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
          13. /-lowering-/.f6476.4%

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
        8. Simplified76.4%

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

        if -7.99999999999999937e134 < t < 1.2e53

        1. Initial program 86.0%

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(z \cdot \left(y - x\right)\right), \color{blue}{a}\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(y - x\right)\right), a\right)\right) \]
          3. --lowering--.f6462.9%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, x\right)\right), a\right)\right) \]
        5. Simplified62.9%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \color{blue}{y}\right), a\right)\right) \]
        7. Step-by-step derivation
          1. Simplified58.8%

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

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

              \[\leadsto \frac{y \cdot z}{a} + x \]
            3. associate-/l*N/A

              \[\leadsto y \cdot \frac{z}{a} + x \]
            4. accelerator-lowering-fma.f64N/A

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

              \[\leadsto \mathsf{fma.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right), x\right) \]
          3. Applied egg-rr61.1%

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

          if 1.2e53 < t

          1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
            10. +-commutativeN/A

              \[\leadsto \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), \left(\frac{t}{a - t}\right), x\right) \]
            11. distribute-neg-inN/A

              \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{t}}{a - t}\right), x\right) \]
            12. unsub-negN/A

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

              \[\leadsto \mathsf{fma.f64}\left(\left(x - y\right), \left(\frac{t}{a - t}\right), x\right) \]
            14. --lowering--.f64N/A

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

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \color{blue}{\left(a - t\right)}\right), x\right) \]
            16. --lowering--.f6444.8%

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(a, \color{blue}{t}\right)\right), x\right) \]
          5. Simplified44.8%

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

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

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

              \[\leadsto \left(x + \left(-1 \cdot x - -1 \cdot y\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            3. sub-negN/A

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

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

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

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

              \[\leadsto \left(x + \left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            8. sub-negN/A

              \[\leadsto \left(x + \left(y - x\right)\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            9. sub-negN/A

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

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

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

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

              \[\leadsto \left(\left(-1 + 1\right) \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            14. metadata-evalN/A

              \[\leadsto \left(0 \cdot x + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            15. mul0-lftN/A

              \[\leadsto \left(0 + y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            16. *-lft-identityN/A

              \[\leadsto \left(0 + 1 \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            17. metadata-evalN/A

              \[\leadsto \left(0 + \left(\mathsf{neg}\left(-1\right)\right) \cdot y\right) + -1 \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            18. cancel-sign-sub-invN/A

              \[\leadsto \left(0 - -1 \cdot y\right) + \color{blue}{-1} \cdot \frac{a \cdot \left(x - y\right)}{t} \]
            19. neg-sub0N/A

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

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

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

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

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

        Alternative 9: 55.2% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(y, \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 (<= t -6.5e+134) t_1 (if (<= t 2.1e+52) (fma y (/ 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 (t <= -6.5e+134) {
        		tmp = t_1;
        	} else if (t <= 2.1e+52) {
        		tmp = fma(y, (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 (t <= -6.5e+134)
        		tmp = t_1;
        	elseif (t <= 2.1e+52)
        		tmp = fma(y, 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[t, -6.5e+134], t$95$1, If[LessEqual[t, 2.1e+52], N[(y * 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}\;t \leq -6.5 \cdot 10^{+134}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\
        \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -6.5e134 or 2.1e52 < t

          1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), \left(\frac{\color{blue}{z - t}}{t}\right), x\right) \]
            9. unsub-negN/A

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

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

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

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

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

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + \left(\mathsf{neg}\left(1\right)\right)\right), x\right) \]
            15. metadata-evalN/A

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(\frac{z}{t} + -1\right), x\right) \]
            16. +-commutativeN/A

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \left(-1 + \color{blue}{\frac{z}{t}}\right), x\right) \]
            17. +-lowering-+.f64N/A

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \color{blue}{\left(\frac{z}{t}\right)}\right), x\right) \]
            18. /-lowering-/.f6449.8%

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(x, y\right), \mathsf{+.f64}\left(-1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right), x\right) \]
          5. Simplified49.8%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(y, \left(1 + \left(\mathsf{neg}\left(\frac{z}{t}\right)\right)\right)\right) \]
            11. unsub-negN/A

              \[\leadsto \mathsf{*.f64}\left(y, \left(1 - \color{blue}{\frac{z}{t}}\right)\right) \]
            12. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
            13. /-lowering-/.f6463.1%

              \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
          8. Simplified63.1%

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

          if -6.5e134 < t < 2.1e52

          1. Initial program 86.0%

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(z \cdot \left(y - x\right)\right), \color{blue}{a}\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(y - x\right)\right), a\right)\right) \]
            3. --lowering--.f6462.9%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, x\right)\right), a\right)\right) \]
          5. Simplified62.9%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \color{blue}{y}\right), a\right)\right) \]
          7. Step-by-step derivation
            1. Simplified58.8%

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

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

                \[\leadsto \frac{y \cdot z}{a} + x \]
              3. associate-/l*N/A

                \[\leadsto y \cdot \frac{z}{a} + x \]
              4. accelerator-lowering-fma.f64N/A

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

                \[\leadsto \mathsf{fma.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right), x\right) \]
            3. Applied egg-rr61.1%

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

          Alternative 10: 53.0% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+134}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= t -8.5e+134) y (if (<= t 4.7e+54) (fma y (/ z a) x) y)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (t <= -8.5e+134) {
          		tmp = y;
          	} else if (t <= 4.7e+54) {
          		tmp = fma(y, (z / a), x);
          	} else {
          		tmp = y;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (t <= -8.5e+134)
          		tmp = y;
          	elseif (t <= 4.7e+54)
          		tmp = fma(y, Float64(z / a), x);
          	else
          		tmp = y;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.5e+134], y, If[LessEqual[t, 4.7e+54], N[(y * N[(z / a), $MachinePrecision] + x), $MachinePrecision], y]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -8.5 \cdot 10^{+134}:\\
          \;\;\;\;y\\
          
          \mathbf{elif}\;t \leq 4.7 \cdot 10^{+54}:\\
          \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -8.50000000000000024e134 or 4.69999999999999993e54 < t

            1. Initial program 38.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 \color{blue}{y} \]
            4. Step-by-step derivation
              1. Simplified58.8%

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

              if -8.50000000000000024e134 < t < 4.69999999999999993e54

              1. Initial program 86.0%

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(z \cdot \left(y - x\right)\right), \color{blue}{a}\right)\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(y - x\right)\right), a\right)\right) \]
                3. --lowering--.f6462.9%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, x\right)\right), a\right)\right) \]
              5. Simplified62.9%

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

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \color{blue}{y}\right), a\right)\right) \]
              7. Step-by-step derivation
                1. Simplified58.8%

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

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

                    \[\leadsto \frac{y \cdot z}{a} + x \]
                  3. associate-/l*N/A

                    \[\leadsto y \cdot \frac{z}{a} + x \]
                  4. accelerator-lowering-fma.f64N/A

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

                    \[\leadsto \mathsf{fma.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right), x\right) \]
                3. Applied egg-rr61.1%

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

              Alternative 11: 37.7% accurate, 2.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+129}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= t -1.3e+129) y (if (<= t 1.15e+54) x y)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (t <= -1.3e+129) {
              		tmp = y;
              	} else if (t <= 1.15e+54) {
              		tmp = x;
              	} else {
              		tmp = y;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: tmp
                  if (t <= (-1.3d+129)) then
                      tmp = y
                  else if (t <= 1.15d+54) then
                      tmp = x
                  else
                      tmp = y
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (t <= -1.3e+129) {
              		tmp = y;
              	} else if (t <= 1.15e+54) {
              		tmp = x;
              	} else {
              		tmp = y;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if t <= -1.3e+129:
              		tmp = y
              	elif t <= 1.15e+54:
              		tmp = x
              	else:
              		tmp = y
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (t <= -1.3e+129)
              		tmp = y;
              	elseif (t <= 1.15e+54)
              		tmp = x;
              	else
              		tmp = y;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (t <= -1.3e+129)
              		tmp = y;
              	elseif (t <= 1.15e+54)
              		tmp = x;
              	else
              		tmp = y;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+129], y, If[LessEqual[t, 1.15e+54], x, y]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -1.3 \cdot 10^{+129}:\\
              \;\;\;\;y\\
              
              \mathbf{elif}\;t \leq 1.15 \cdot 10^{+54}:\\
              \;\;\;\;x\\
              
              \mathbf{else}:\\
              \;\;\;\;y\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -1.30000000000000006e129 or 1.14999999999999997e54 < t

                1. Initial program 38.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}{y} \]
                4. Step-by-step derivation
                  1. Simplified58.3%

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

                  if -1.30000000000000006e129 < t < 1.14999999999999997e54

                  1. Initial program 86.5%

                    \[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} \]
                  4. Step-by-step derivation
                    1. Simplified33.6%

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

                  Alternative 12: 24.5% accurate, 29.0× speedup?

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

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

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

                    Developer Target 1: 86.9% 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 2024193 
                    (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))))