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

Percentage Accurate: 97.1% → 99.6%
Time: 10.8s
Alternatives: 13
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 13 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: 97.1% 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.6% accurate, 1.0× speedup?

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

\\
x + \frac{a}{\frac{\left(t - z\right) + 1}{z - y}}
\end{array}
Derivation
  1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -a \cdot y\\ t_2 := x + \frac{z - y}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (* a y))) (t_2 (+ x (/ (- z y) (/ (+ (- t z) 1.0) a)))))
   (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 5e+307) (- x a) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -(a * y);
	double t_2 = x + ((z - y) / (((t - z) + 1.0) / a));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 5e+307) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -(a * y);
	double t_2 = x + ((z - y) / (((t - z) + 1.0) / a));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= 5e+307) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -(a * y)
	t_2 = x + ((z - y) / (((t - z) + 1.0) / a))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= 5e+307:
		tmp = x - a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-Float64(a * y))
	t_2 = Float64(x + Float64(Float64(z - y) / Float64(Float64(Float64(t - z) + 1.0) / a)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 5e+307)
		tmp = Float64(x - a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -(a * y);
	t_2 = x + ((z - y) / (((t - z) + 1.0) / a));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= 5e+307)
		tmp = x - a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(a * y), $MachinePrecision])}, Block[{t$95$2 = N[(x + N[(N[(z - y), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+307], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))) < -inf.0 or 5e307 < (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)))

    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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{a \cdot y} \]
      2. Taylor expanded in x around 0

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

          \[\leadsto y \cdot \left(-a\right) \]

        if -inf.0 < (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))) < 5e307

        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--.f6464.9

            \[\leadsto \color{blue}{x - a} \]
        5. Applied rewrites64.9%

          \[\leadsto \color{blue}{x - a} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification65.9%

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

      Alternative 3: 87.4% accurate, 1.0× speedup?

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

        1. Initial program 96.7%

          \[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. lower-fma.f64N/A

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

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

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

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

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

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

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

        if -1.74999999999999997e80 < t < 0.5

        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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 88.9% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \mathsf{fma}\left(a, -\frac{y}{z}, a\right)\\ \mathbf{if}\;z \leq -7600000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 510000000:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{-1 - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (- x (fma a (- (/ y z)) a))))
         (if (<= z -7600000000000.0)
           t_1
           (if (<= z 510000000.0) (fma a (/ y (- -1.0 t)) x) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x - fma(a, -(y / z), a);
      	double tmp;
      	if (z <= -7600000000000.0) {
      		tmp = t_1;
      	} else if (z <= 510000000.0) {
      		tmp = fma(a, (y / (-1.0 - t)), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x - fma(a, Float64(-Float64(y / z)), a))
      	tmp = 0.0
      	if (z <= -7600000000000.0)
      		tmp = t_1;
      	elseif (z <= 510000000.0)
      		tmp = fma(a, Float64(y / Float64(-1.0 - t)), x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * (-N[(y / z), $MachinePrecision]) + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7600000000000.0], t$95$1, If[LessEqual[z, 510000000.0], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x - \mathsf{fma}\left(a, -\frac{y}{z}, a\right)\\
      \mathbf{if}\;z \leq -7600000000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 510000000:\\
      \;\;\;\;\mathsf{fma}\left(a, \frac{y}{-1 - t}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -7.6e12 or 5.1e8 < z

        1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.6e12 < z < 5.1e8

          1. Initial program 98.6%

            \[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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 87.3% 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 -7600000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 510000000:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{-1 - t}, 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 -7600000000000.0)
             t_1
             (if (<= z 510000000.0) (fma a (/ y (- -1.0 t)) 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 <= -7600000000000.0) {
        		tmp = t_1;
        	} else if (z <= 510000000.0) {
        		tmp = fma(a, (y / (-1.0 - t)), 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 <= -7600000000000.0)
        		tmp = t_1;
        	elseif (z <= 510000000.0)
        		tmp = fma(a, Float64(y / Float64(-1.0 - t)), 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, -7600000000000.0], t$95$1, If[LessEqual[z, 510000000.0], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] + 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 -7600000000000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 510000000:\\
        \;\;\;\;\mathsf{fma}\left(a, \frac{y}{-1 - t}, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -7.6e12 or 5.1e8 < z

          1. Initial program 96.3%

            \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

            if -7.6e12 < z < 5.1e8

            1. Initial program 98.6%

              \[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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

          Alternative 6: 84.2% accurate, 1.1× speedup?

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

            1. Initial program 97.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

              if -1e14 < z < 1.89999999999999998e56

              1. Initial program 98.7%

                \[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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

              if 1.89999999999999998e56 < z

              1. Initial program 94.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--.f6478.0

                  \[\leadsto \color{blue}{x - a} \]
              5. Applied rewrites78.0%

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

            Alternative 7: 74.9% accurate, 1.1× speedup?

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

              1. Initial program 96.3%

                \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                if -0.900000000000000022 < z < 0.47999999999999998

                1. Initial program 98.6%

                  \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 74.7% accurate, 1.2× speedup?

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

                  1. Initial program 96.3%

                    \[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--.f6474.7

                      \[\leadsto \color{blue}{x - a} \]
                  5. Applied rewrites74.7%

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

                  if -8.5 < z < 17

                  1. Initial program 98.6%

                    \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 97.3% accurate, 1.3× speedup?

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

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

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

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

                  Alternative 10: 74.5% accurate, 1.5× speedup?

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

                    1. Initial program 96.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--.f6474.8

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

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

                    if -4.7e-17 < z < 17

                    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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 11: 72.9% accurate, 1.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 30:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (<= z -3.1e-17) (- x a) (if (<= z 30.0) (- x (* a y)) (- x a))))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (z <= -3.1e-17) {
                    		tmp = x - a;
                    	} else if (z <= 30.0) {
                    		tmp = x - (a * y);
                    	} else {
                    		tmp = x - a;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8) :: tmp
                        if (z <= (-3.1d-17)) then
                            tmp = x - a
                        else if (z <= 30.0d0) then
                            tmp = x - (a * y)
                        else
                            tmp = x - a
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (z <= -3.1e-17) {
                    		tmp = x - a;
                    	} else if (z <= 30.0) {
                    		tmp = x - (a * y);
                    	} else {
                    		tmp = x - a;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if z <= -3.1e-17:
                    		tmp = x - a
                    	elif z <= 30.0:
                    		tmp = x - (a * y)
                    	else:
                    		tmp = x - a
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (z <= -3.1e-17)
                    		tmp = Float64(x - a);
                    	elseif (z <= 30.0)
                    		tmp = Float64(x - Float64(a * y));
                    	else
                    		tmp = Float64(x - a);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if (z <= -3.1e-17)
                    		tmp = x - a;
                    	elseif (z <= 30.0)
                    		tmp = x - (a * y);
                    	else
                    		tmp = x - a;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e-17], N[(x - a), $MachinePrecision], If[LessEqual[z, 30.0], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -3.1 \cdot 10^{-17}:\\
                    \;\;\;\;x - a\\
                    
                    \mathbf{elif}\;z \leq 30:\\
                    \;\;\;\;x - a \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x - a\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -3.0999999999999998e-17 or 30 < z

                      1. Initial program 96.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--.f6474.8

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

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

                      if -3.0999999999999998e-17 < z < 30

                      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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 12: 59.8% 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.4%

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

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

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

                      Alternative 13: 16.9% 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.4%

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

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

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

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

                          \[\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 2024233 
                        (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))))