Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 96.8% → 99.7%
Time: 8.9s
Alternatives: 16
Speedup: 1.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 96.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{z - y}{\left(t - z\right) - -1}, a, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma (/ (- z y) (- (- t z) -1.0)) a x))
double code(double x, double y, double z, double t, double a) {
	return fma(((z - y) / ((t - z) - -1.0)), a, x);
}
function code(x, y, z, t, a)
	return fma(Float64(Float64(z - y) / Float64(Float64(t - z) - -1.0)), a, x)
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{z - y}{\left(t - z\right) - -1}, a, x\right)
\end{array}
Derivation
  1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 73.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -19000:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-166}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, a, a\right), -y, \mathsf{fma}\left(z, a, x\right)\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -19000 or 2.24999999999999991e49 < z

    1. Initial program 96.8%

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

      \[\leadsto \color{blue}{x - a} \]
    4. Step-by-step derivation
      1. lower--.f6476.8

        \[\leadsto \color{blue}{x - a} \]
    5. Applied rewrites76.8%

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

    if -19000 < z < -8.5e-166

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
      7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \left(a \cdot y\right) + z \cdot \left(a - a \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites67.4%

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

        \[\leadsto x + \left(a \cdot z + \color{blue}{y \cdot \left(-1 \cdot a + -1 \cdot \left(a \cdot z\right)\right)}\right) \]
      3. Step-by-step derivation
        1. Applied rewrites83.6%

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

        if -8.5e-166 < z < 3.09999999999999992e-83

        1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{y}{-1 \cdot \color{blue}{t}}, a, x\right) \]
        9. Step-by-step derivation
          1. Applied rewrites78.8%

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

          if 3.09999999999999992e-83 < z < 0.92000000000000004

          1. Initial program 99.8%

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
            7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(-1 \cdot y + z \cdot \left(1 - y\right), a, x\right) \]
          7. Step-by-step derivation
            1. Applied rewrites89.7%

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

            if 0.92000000000000004 < z < 2.24999999999999991e49

            1. Initial program 100.0%

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

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

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

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

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

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

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

              \[\leadsto x - \frac{a \cdot y}{t} \]
            7. Step-by-step derivation
              1. Applied rewrites44.6%

                \[\leadsto x - \frac{y \cdot a}{t} \]
              2. Taylor expanded in z around 0

                \[\leadsto x - \frac{a \cdot y}{\color{blue}{t}} \]
              3. Step-by-step derivation
                1. Applied rewrites51.5%

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

              Alternative 3: 73.6% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\ \mathbf{if}\;z \leq -19000:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-83}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{-t}, a, x\right)\\ \mathbf{elif}\;z \leq 0.92:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+49}:\\ \;\;\;\;x - \frac{a}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (let* ((t_1 (fma (fma (- 1.0 y) z (- y)) a x)))
                 (if (<= z -19000.0)
                   (- x a)
                   (if (<= z -8.5e-166)
                     t_1
                     (if (<= z 3.1e-83)
                       (fma (/ y (- t)) a x)
                       (if (<= z 0.92)
                         t_1
                         (if (<= z 2.25e+49) (- x (* (/ a t) y)) (- x a))))))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = fma(fma((1.0 - y), z, -y), a, x);
              	double tmp;
              	if (z <= -19000.0) {
              		tmp = x - a;
              	} else if (z <= -8.5e-166) {
              		tmp = t_1;
              	} else if (z <= 3.1e-83) {
              		tmp = fma((y / -t), a, x);
              	} else if (z <= 0.92) {
              		tmp = t_1;
              	} else if (z <= 2.25e+49) {
              		tmp = x - ((a / t) * y);
              	} else {
              		tmp = x - a;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	t_1 = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x)
              	tmp = 0.0
              	if (z <= -19000.0)
              		tmp = Float64(x - a);
              	elseif (z <= -8.5e-166)
              		tmp = t_1;
              	elseif (z <= 3.1e-83)
              		tmp = fma(Float64(y / Float64(-t)), a, x);
              	elseif (z <= 0.92)
              		tmp = t_1;
              	elseif (z <= 2.25e+49)
              		tmp = Float64(x - Float64(Float64(a / t) * y));
              	else
              		tmp = Float64(x - a);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[z, -19000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, -8.5e-166], t$95$1, If[LessEqual[z, 3.1e-83], N[(N[(y / (-t)), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 0.92], t$95$1, If[LessEqual[z, 2.25e+49], N[(x - N[(N[(a / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
              \mathbf{if}\;z \leq -19000:\\
              \;\;\;\;x - a\\
              
              \mathbf{elif}\;z \leq -8.5 \cdot 10^{-166}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 3.1 \cdot 10^{-83}:\\
              \;\;\;\;\mathsf{fma}\left(\frac{y}{-t}, a, x\right)\\
              
              \mathbf{elif}\;z \leq 0.92:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 2.25 \cdot 10^{+49}:\\
              \;\;\;\;x - \frac{a}{t} \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;x - a\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if z < -19000 or 2.24999999999999991e49 < z

                1. Initial program 96.8%

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

                  \[\leadsto \color{blue}{x - a} \]
                4. Step-by-step derivation
                  1. lower--.f6476.8

                    \[\leadsto \color{blue}{x - a} \]
                5. Applied rewrites76.8%

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

                if -19000 < z < -8.5e-166 or 3.09999999999999992e-83 < z < 0.92000000000000004

                1. Initial program 99.8%

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                  7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(-1 \cdot y + z \cdot \left(1 - y\right), a, x\right) \]
                7. Step-by-step derivation
                  1. Applied rewrites85.9%

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

                  if -8.5e-166 < z < 3.09999999999999992e-83

                  1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{y}{-1 \cdot \color{blue}{t}}, a, x\right) \]
                  9. Step-by-step derivation
                    1. Applied rewrites78.8%

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

                    if 0.92000000000000004 < z < 2.24999999999999991e49

                    1. Initial program 100.0%

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

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

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

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

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

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

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

                      \[\leadsto x - \frac{a \cdot y}{t} \]
                    7. Step-by-step derivation
                      1. Applied rewrites44.6%

                        \[\leadsto x - \frac{y \cdot a}{t} \]
                      2. Taylor expanded in z around 0

                        \[\leadsto x - \frac{a \cdot y}{\color{blue}{t}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites51.5%

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

                      Alternative 4: 73.4% accurate, 0.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{a}{t} \cdot y\\ t_2 := \mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\ \mathbf{if}\;z \leq -19000:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-166}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.92:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (let* ((t_1 (- x (* (/ a t) y))) (t_2 (fma (fma (- 1.0 y) z (- y)) a x)))
                         (if (<= z -19000.0)
                           (- x a)
                           (if (<= z -8.4e-166)
                             t_2
                             (if (<= z 3.1e-83)
                               t_1
                               (if (<= z 0.92) t_2 (if (<= z 2.25e+49) t_1 (- x a))))))))
                      double code(double x, double y, double z, double t, double a) {
                      	double t_1 = x - ((a / t) * y);
                      	double t_2 = fma(fma((1.0 - y), z, -y), a, x);
                      	double tmp;
                      	if (z <= -19000.0) {
                      		tmp = x - a;
                      	} else if (z <= -8.4e-166) {
                      		tmp = t_2;
                      	} else if (z <= 3.1e-83) {
                      		tmp = t_1;
                      	} else if (z <= 0.92) {
                      		tmp = t_2;
                      	} else if (z <= 2.25e+49) {
                      		tmp = t_1;
                      	} else {
                      		tmp = x - a;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	t_1 = Float64(x - Float64(Float64(a / t) * y))
                      	t_2 = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x)
                      	tmp = 0.0
                      	if (z <= -19000.0)
                      		tmp = Float64(x - a);
                      	elseif (z <= -8.4e-166)
                      		tmp = t_2;
                      	elseif (z <= 3.1e-83)
                      		tmp = t_1;
                      	elseif (z <= 0.92)
                      		tmp = t_2;
                      	elseif (z <= 2.25e+49)
                      		tmp = t_1;
                      	else
                      		tmp = Float64(x - a);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(a / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[z, -19000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, -8.4e-166], t$95$2, If[LessEqual[z, 3.1e-83], t$95$1, If[LessEqual[z, 0.92], t$95$2, If[LessEqual[z, 2.25e+49], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := x - \frac{a}{t} \cdot y\\
                      t_2 := \mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
                      \mathbf{if}\;z \leq -19000:\\
                      \;\;\;\;x - a\\
                      
                      \mathbf{elif}\;z \leq -8.4 \cdot 10^{-166}:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;z \leq 3.1 \cdot 10^{-83}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 0.92:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;z \leq 2.25 \cdot 10^{+49}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x - a\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -19000 or 2.24999999999999991e49 < z

                        1. Initial program 96.8%

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

                          \[\leadsto \color{blue}{x - a} \]
                        4. Step-by-step derivation
                          1. lower--.f6476.8

                            \[\leadsto \color{blue}{x - a} \]
                        5. Applied rewrites76.8%

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

                        if -19000 < z < -8.3999999999999998e-166 or 3.09999999999999992e-83 < z < 0.92000000000000004

                        1. Initial program 99.8%

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                          7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-1 \cdot y + z \cdot \left(1 - y\right), a, x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites85.9%

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

                          if -8.3999999999999998e-166 < z < 3.09999999999999992e-83 or 0.92000000000000004 < z < 2.24999999999999991e49

                          1. Initial program 97.5%

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

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

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

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

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

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

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

                            \[\leadsto x - \frac{a \cdot y}{t} \]
                          7. Step-by-step derivation
                            1. Applied rewrites66.7%

                              \[\leadsto x - \frac{y \cdot a}{t} \]
                            2. Taylor expanded in z around 0

                              \[\leadsto x - \frac{a \cdot y}{\color{blue}{t}} \]
                            3. Step-by-step derivation
                              1. Applied rewrites73.1%

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

                            Alternative 5: 73.1% accurate, 0.9× speedup?

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

                              1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y}{-1 \cdot \color{blue}{t}}, a, x\right) \]
                              9. Step-by-step derivation
                                1. Applied rewrites83.0%

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

                                if -1.965e71 < t < 5.80000000000000022e-146

                                1. Initial program 98.2%

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                  7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites68.7%

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

                                  if 5.80000000000000022e-146 < t < 5.0000000000000001e-4

                                  1. Initial program 96.8%

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                    7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(-1 \cdot y, a, x\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites73.5%

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

                                    if 5.0000000000000001e-4 < t

                                    1. Initial program 98.3%

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

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

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

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

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

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

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

                                      \[\leadsto x - \frac{a \cdot y}{t} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites71.0%

                                        \[\leadsto x - \frac{y \cdot a}{t} \]
                                      2. Taylor expanded in z around 0

                                        \[\leadsto x - \frac{a \cdot y}{\color{blue}{t}} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites80.6%

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

                                      Alternative 6: 91.9% accurate, 1.0× speedup?

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

                                        1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -1e12 < t < 4.49999999999999959e59

                                        1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 4.49999999999999959e59 < t

                                        1. Initial program 97.9%

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

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

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

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

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

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

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

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

                                        Alternative 7: 90.7% accurate, 1.0× speedup?

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

                                          1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -1e12 < t < 4.49999999999999959e59

                                          1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 4.49999999999999959e59 < t

                                          1. Initial program 97.9%

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

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

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

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

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

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

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

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

                                          Alternative 8: 88.5% accurate, 1.1× speedup?

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

                                            1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -1.05e6 < z < 3.5000000000000001e55

                                            1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 3.5000000000000001e55 < z

                                            1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 9: 87.6% accurate, 1.1× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - z, \frac{a}{z}, x\right)\\ \mathbf{if}\;z \leq -1050000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (let* ((t_1 (fma (- y z) (/ a z) x)))
                                             (if (<= z -1050000.0)
                                               t_1
                                               (if (<= z 3.5e+55) (fma (/ y (- -1.0 t)) a x) t_1))))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double t_1 = fma((y - z), (a / z), x);
                                          	double tmp;
                                          	if (z <= -1050000.0) {
                                          		tmp = t_1;
                                          	} else if (z <= 3.5e+55) {
                                          		tmp = fma((y / (-1.0 - t)), a, x);
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t, a)
                                          	t_1 = fma(Float64(y - z), Float64(a / z), x)
                                          	tmp = 0.0
                                          	if (z <= -1050000.0)
                                          		tmp = t_1;
                                          	elseif (z <= 3.5e+55)
                                          		tmp = fma(Float64(y / Float64(-1.0 - t)), a, x);
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1050000.0], t$95$1, If[LessEqual[z, 3.5e+55], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \mathsf{fma}\left(y - z, \frac{a}{z}, x\right)\\
                                          \mathbf{if}\;z \leq -1050000:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;z \leq 3.5 \cdot 10^{+55}:\\
                                          \;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if z < -1.05e6 or 3.5000000000000001e55 < z

                                            1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -1.05e6 < z < 3.5000000000000001e55

                                            1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 10: 85.3% accurate, 1.1× speedup?

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

                                            1. Initial program 98.5%

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                              7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites77.3%

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

                                              if -1.05e6 < z < 1.25000000000000006e56

                                              1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 1.25000000000000006e56 < z

                                              1. Initial program 96.1%

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

                                                \[\leadsto \color{blue}{x - a} \]
                                              4. Step-by-step derivation
                                                1. lower--.f6479.4

                                                  \[\leadsto \color{blue}{x - a} \]
                                              5. Applied rewrites79.4%

                                                \[\leadsto \color{blue}{x - a} \]
                                            8. Recombined 3 regimes into one program.
                                            9. Add Preprocessing

                                            Alternative 11: 75.2% accurate, 1.2× speedup?

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

                                              1. Initial program 97.5%

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

                                                \[\leadsto \color{blue}{x - a} \]
                                              4. Step-by-step derivation
                                                1. lower--.f6477.8

                                                  \[\leadsto \color{blue}{x - a} \]
                                              5. Applied rewrites77.8%

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

                                              if -19000 < z < 3.5000000000000001e55

                                              1. Initial program 97.8%

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                                7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(-1 \cdot y + z \cdot \left(1 - y\right), a, x\right) \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites67.9%

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

                                              Alternative 12: 97.2% accurate, 1.3× speedup?

                                              \[\begin{array}{l} \\ \mathsf{fma}\left(\frac{a}{-1 - \left(t - z\right)}, y - z, x\right) \end{array} \]
                                              (FPCore (x y z t a) :precision binary64 (fma (/ a (- -1.0 (- t z))) (- y z) x))
                                              double code(double x, double y, double z, double t, double a) {
                                              	return fma((a / (-1.0 - (t - z))), (y - z), x);
                                              }
                                              
                                              function code(x, y, z, t, a)
                                              	return fma(Float64(a / Float64(-1.0 - Float64(t - z))), Float64(y - z), x)
                                              end
                                              
                                              code[x_, y_, z_, t_, a_] := N[(N[(a / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \mathsf{fma}\left(\frac{a}{-1 - \left(t - z\right)}, y - z, x\right)
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\mathsf{neg}\left(\frac{\left(t - z\right) + 1}{a}\right)}, y - z, x\right)} \]
                                              4. Applied rewrites97.7%

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

                                              Alternative 13: 74.1% accurate, 1.7× speedup?

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

                                                1. Initial program 97.5%

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

                                                  \[\leadsto \color{blue}{x - a} \]
                                                4. Step-by-step derivation
                                                  1. lower--.f6477.8

                                                    \[\leadsto \color{blue}{x - a} \]
                                                5. Applied rewrites77.8%

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

                                                if -85000 < z < 3.5000000000000001e55

                                                1. Initial program 97.8%

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

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

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

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

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

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

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

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                                  7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(-1 \cdot y, a, x\right) \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites65.0%

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

                                                Alternative 14: 68.2% accurate, 1.8× speedup?

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

                                                  1. Initial program 97.2%

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

                                                    \[\leadsto \color{blue}{x - a} \]
                                                  4. Step-by-step derivation
                                                    1. lower--.f6470.3

                                                      \[\leadsto \color{blue}{x - a} \]
                                                  5. Applied rewrites70.3%

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

                                                  if -9.5000000000000005e-5 < z < 1

                                                  1. Initial program 98.2%

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

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

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

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

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

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

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

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{y - z}{1 - z}\right), a, x\right)} \]
                                                    7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

                                                    \[\leadsto x + \color{blue}{\left(-1 \cdot \left(a \cdot y\right) + z \cdot \left(a - a \cdot y\right)\right)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites68.4%

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

                                                      \[\leadsto x + a \cdot \color{blue}{z} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites56.7%

                                                        \[\leadsto \mathsf{fma}\left(z, a, x\right) \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 15: 61.7% accurate, 8.8× speedup?

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

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

                                                      \[\leadsto \color{blue}{x - a} \]
                                                    4. Step-by-step derivation
                                                      1. lower--.f6458.6

                                                        \[\leadsto \color{blue}{x - a} \]
                                                    5. Applied rewrites58.6%

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

                                                    Alternative 16: 16.8% accurate, 11.7× speedup?

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

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

                                                      \[\leadsto \color{blue}{x - a} \]
                                                    4. Step-by-step derivation
                                                      1. lower--.f6458.6

                                                        \[\leadsto \color{blue}{x - a} \]
                                                    5. Applied rewrites58.6%

                                                      \[\leadsto \color{blue}{x - a} \]
                                                    6. Taylor expanded in a around inf

                                                      \[\leadsto -1 \cdot \color{blue}{a} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites15.6%

                                                        \[\leadsto -a \]
                                                      2. Add Preprocessing

                                                      Developer Target 1: 99.7% accurate, 1.2× speedup?

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

                                                      Reproduce

                                                      ?
                                                      herbie shell --seed 2024254 
                                                      (FPCore (x y z t a)
                                                        :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                                        :precision binary64
                                                      
                                                        :alt
                                                        (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
                                                      
                                                        (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))