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

Percentage Accurate: 97.3% → 99.6%
Time: 12.2s
Alternatives: 15
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 15 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.3% 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.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
    13. 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 \]
    14. distribute-frac-neg2N/A

      \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
    15. 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)} \]
  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{y - z}{-1 + \left(z - t\right)}, a, x\right) \]
  6. Add Preprocessing

Alternative 2: 91.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5e89 or 6.40000000000000019e41 < t

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

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

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

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

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

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

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

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

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

    if -4.5e89 < t < 6.40000000000000019e41

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    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(\color{blue}{\frac{y - z}{z - 1}}, a, x\right) \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

Alternative 3: 87.6% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 93.0%

      \[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--.f6490.9

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

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

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

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

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

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

    if -1e80 < z < 1.3e8

    1. Initial program 98.3%

      \[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--.f6491.5

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

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

    if 1.3e8 < z

    1. Initial program 87.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.3% accurate, 1.1× speedup?

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

\mathbf{elif}\;z \leq 130000000:\\
\;\;\;\;\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 < -2.49999999999999996e76 or 1.3e8 < z

    1. Initial program 90.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 - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999996e76 < z < 1.3e8

    1. Initial program 98.2%

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

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

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

Alternative 5: 84.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+118}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 240000000:\\ \;\;\;\;\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 -1.6e+118)
   (- x a)
   (if (<= z 240000000.0) (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 <= -1.6e+118) {
		tmp = x - a;
	} else if (z <= 240000000.0) {
		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 <= -1.6e+118)
		tmp = Float64(x - a);
	elseif (z <= 240000000.0)
		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, -1.6e+118], N[(x - a), $MachinePrecision], If[LessEqual[z, 240000000.0], 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.6 \cdot 10^{+118}:\\
\;\;\;\;x - a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.60000000000000008e118 or 2.4e8 < z

    1. Initial program 89.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--.f6476.8

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

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

    if -1.60000000000000008e118 < z < 2.4e8

    1. Initial program 98.3%

      \[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--.f6490.2

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

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

Alternative 6: 97.6% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e161 < z

    1. Initial program 76.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    4. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 72.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y}{-t}, x\right)\\
\mathbf{if}\;t \leq -6:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6 or 3.0999999999999999e-19 < t

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6 < t < 3.0999999999999999e-19

    1. Initial program 94.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    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--.f6469.2

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

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

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

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

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

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

        \[\leadsto \left(\left(a \cdot t\right) \cdot y + \color{blue}{\left(-1 \cdot a\right) \cdot y}\right) + x \]
      5. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(t, a, \color{blue}{\mathsf{neg}\left(a\right)}\right), x\right) \]
      10. lower-neg.f6469.2

        \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(t, a, \color{blue}{-a}\right), x\right) \]
    10. Applied rewrites69.2%

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

Alternative 8: 72.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
\mathbf{if}\;t \leq -6:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6 or 3.0999999999999999e-19 < t

    1. Initial program 96.1%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{a \cdot y}}{t} \]
    8. Applied rewrites71.2%

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

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

        \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
      3. lift--.f6471.2

        \[\leadsto \color{blue}{x - \frac{a \cdot y}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
      5. lift-*.f64N/A

        \[\leadsto x - \frac{\color{blue}{a \cdot y}}{t} \]
      6. *-commutativeN/A

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{a}{t}} \]
      9. lower-/.f6475.5

        \[\leadsto x - y \cdot \color{blue}{\frac{a}{t}} \]
    10. Applied rewrites75.5%

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

    if -6 < t < 3.0999999999999999e-19

    1. Initial program 94.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    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--.f6469.2

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

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

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

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

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

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

        \[\leadsto \left(\left(a \cdot t\right) \cdot y + \color{blue}{\left(-1 \cdot a\right) \cdot y}\right) + x \]
      5. distribute-rgt-outN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(t, a, \color{blue}{\mathsf{neg}\left(a\right)}\right), x\right) \]
      10. lower-neg.f6469.2

        \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(t, a, \color{blue}{-a}\right), x\right) \]
    10. Applied rewrites69.2%

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

Alternative 9: 75.1% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 92.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--.f6473.8

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

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

    if -0.71999999999999997 < z < 4.59999999999999958e-13

    1. Initial program 98.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    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(\color{blue}{\frac{y - z}{z - 1}}, a, x\right) \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.1% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 92.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--.f6473.8

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

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

    if -66 < z < 4.59999999999999958e-13

    1. Initial program 98.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
      13. 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 \]
      14. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
      15. 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)} \]
    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(\color{blue}{\frac{y - z}{z - 1}}, a, x\right) \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 65.0% accurate, 1.3× speedup?

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

      1. Initial program 92.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--.f6472.7

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

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

      if -9.9999999999999998e-13 < z < 4.79999999999999999e-78

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
        13. 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 \]
        14. distribute-frac-neg2N/A

          \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
        15. 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)} \]
      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(\color{blue}{\frac{y - z}{z - 1}}, a, x\right) \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{a \cdot z + x} \]
        2. lower-fma.f6464.2

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, z, x\right)} \]
      13. Applied rewrites64.2%

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

      if 4.79999999999999999e-78 < z < 4.5999999999999998e-16

      1. Initial program 100.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
        2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
        13. 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 \]
        14. distribute-frac-neg2N/A

          \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
        15. 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)} \]
      4. Applied rewrites99.8%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y\right)}, a, x\right) \]
        2. lower-neg.f6460.4

          \[\leadsto \mathsf{fma}\left(\color{blue}{-y}, a, x\right) \]
      10. Applied rewrites60.4%

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

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot y} \]
        3. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot y \]
        4. lower-neg.f6444.2

          \[\leadsto \color{blue}{\left(-a\right)} \cdot y \]
      13. Applied rewrites44.2%

        \[\leadsto \color{blue}{\left(-a\right) \cdot y} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification66.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-12}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-78}:\\ \;\;\;\;\mathsf{fma}\left(a, z, x\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-16}:\\ \;\;\;\;y \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 73.9% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -66:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-13}:\\ \;\;\;\;\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 -66.0) (- x a) (if (<= z 4.6e-13) (fma (- y) a x) (- x a))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -66.0) {
    		tmp = x - a;
    	} else if (z <= 4.6e-13) {
    		tmp = fma(-y, a, x);
    	} else {
    		tmp = x - a;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -66.0)
    		tmp = Float64(x - a);
    	elseif (z <= 4.6e-13)
    		tmp = fma(Float64(-y), a, x);
    	else
    		tmp = Float64(x - a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -66.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 4.6e-13], N[((-y) * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -66:\\
    \;\;\;\;x - a\\
    
    \mathbf{elif}\;z \leq 4.6 \cdot 10^{-13}:\\
    \;\;\;\;\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 < -66 or 4.59999999999999958e-13 < z

      1. Initial program 92.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--.f6473.8

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

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

      if -66 < z < 4.59999999999999958e-13

      1. Initial program 98.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 x - \frac{\color{blue}{y - z}}{\frac{\left(t - z\right) + 1}{a}} \]
        2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
        13. 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 \]
        14. distribute-frac-neg2N/A

          \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
        15. 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)} \]
      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--.f6492.4

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y\right)}, a, x\right) \]
        2. lower-neg.f6468.9

          \[\leadsto \mathsf{fma}\left(\color{blue}{-y}, a, x\right) \]
      10. Applied rewrites68.9%

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

    Alternative 13: 66.2% accurate, 1.8× speedup?

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

      1. Initial program 92.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--.f6471.0

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

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

      if -9.9999999999999998e-13 < z < 1.29999999999999997e-33

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right)\right) + x \]
        13. 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 \]
        14. distribute-frac-neg2N/A

          \[\leadsto \color{blue}{\frac{y - z}{\mathsf{neg}\left(\left(\left(t - z\right) + 1\right)\right)}} \cdot a + x \]
        15. 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)} \]
      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(\color{blue}{\frac{y - z}{z - 1}}, a, x\right) \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{a \cdot z + x} \]
        2. lower-fma.f6459.5

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, z, x\right)} \]
      13. Applied rewrites59.5%

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

    Alternative 14: 60.1% 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 95.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--.f6456.3

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

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

    Alternative 15: 17.1% 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 95.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--.f6456.3

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

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

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

        \[\leadsto \color{blue}{\mathsf{neg}\left(a\right)} \]
      2. lower-neg.f6413.0

        \[\leadsto \color{blue}{-a} \]
    8. Applied rewrites13.0%

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

    Developer Target 1: 99.6% 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 2024219 
    (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))))