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

Percentage Accurate: 96.7% → 99.6%
Time: 12.7s
Alternatives: 16
Speedup: 1.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 96.7% 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 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 egg-rr99.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: 74.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.72 \cdot 10^{+62}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq -5.6 \cdot 10^{-86}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7200000000000001e62 or 2.3000000000000001e-4 < z

    1. Initial program 96.7%

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

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

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

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

    if -1.7200000000000001e62 < z < -5.60000000000000019e-86

    1. Initial program 97.3%

      \[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 egg-rr99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
      5. lower-*.f6467.6

        \[\leadsto x - \frac{\color{blue}{a \cdot y}}{t} \]
    10. Simplified67.6%

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

    if -5.60000000000000019e-86 < z < 2.3000000000000001e-4

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\left(\mathsf{neg}\left(a \cdot z\right)\right)} + \left(\mathsf{neg}\left(a\right)\right), x\right) \]
      3. distribute-neg-outN/A

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

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

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

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

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

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

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

Alternative 3: 74.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+45}:\\
\;\;\;\;x - a\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.20000000000000049e45 or 2.3000000000000001e-4 < z

    1. Initial program 96.8%

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

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

        \[\leadsto \color{blue}{x - a} \]
    5. Simplified77.2%

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

    if -9.20000000000000049e45 < z < -1.80000000000000006e-83

    1. Initial program 97.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--.f6475.1

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

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

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

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

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

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

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

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

    if -1.80000000000000006e-83 < z < 2.3000000000000001e-4

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\left(\mathsf{neg}\left(a \cdot z\right)\right)} + \left(\mathsf{neg}\left(a\right)\right), x\right) \]
      3. distribute-neg-outN/A

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

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

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

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

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

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

Alternative 4: 89.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.29999999999999986e-28

    1. Initial program 99.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 egg-rr99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999986e-28 < y < 2.19999999999999978e99

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{z}{\left(1 + t\right) - z}} + x \]
      6. 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--.f6494.7

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

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

    if 2.19999999999999978e99 < y

    1. Initial program 92.5%

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

        \[\leadsto 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 egg-rr99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.29999999999999986e-28 or 2.19999999999999978e99 < y

    1. Initial program 97.5%

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

        \[\leadsto 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 egg-rr99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999986e-28 < y < 2.19999999999999978e99

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{z}{\left(1 + t\right) - z}} + x \]
      6. 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--.f6494.7

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

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

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

Alternative 6: 83.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.29999999999999986e-28

    1. Initial program 99.9%

      \[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--.f6487.4

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

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

    if -2.29999999999999986e-28 < y < 3.7000000000000001e99

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{z}{\left(1 + t\right) - z}} + x \]
      6. 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--.f6494.7

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

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

    if 3.7000000000000001e99 < y

    1. Initial program 92.5%

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

        \[\leadsto 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 egg-rr99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.4% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.0500000000000001e-28

    1. Initial program 99.9%

      \[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--.f6487.4

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

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

    if -2.0500000000000001e-28 < y < 3.7000000000000001e99

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{z}{\left(1 + t\right) - z}} + x \]
      6. 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--.f6494.7

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

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

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

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

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

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

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

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

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

    if 3.7000000000000001e99 < y

    1. Initial program 92.5%

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

        \[\leadsto 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 egg-rr99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 84.8% accurate, 1.1× speedup?

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+24}:\\
\;\;\;\;\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 < -2.6000000000000002e77 or 4.50000000000000019e24 < z

    1. Initial program 96.6%

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

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

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

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

    if -2.6000000000000002e77 < z < 4.50000000000000019e24

    1. Initial program 99.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--.f6488.7

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

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

Alternative 9: 71.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 4 \cdot 10^{-19}:\\
\;\;\;\;x - y \cdot a\\

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


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

    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} \]
      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 egg-rr99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e-5 < t < 3.9999999999999999e-19

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - a \cdot y} \]
      4. lower-*.f6472.4

        \[\leadsto x - \color{blue}{a \cdot y} \]
    8. Simplified72.4%

      \[\leadsto \color{blue}{x - a \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.3%

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

Alternative 10: 74.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+45}:\\
\;\;\;\;x - a\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.20000000000000049e45 or 2.3000000000000001e-4 < z

    1. Initial program 96.8%

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

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

        \[\leadsto \color{blue}{x - a} \]
    5. Simplified77.2%

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

    if -9.20000000000000049e45 < z < -1.80000000000000006e-83

    1. Initial program 97.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--.f6475.1

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

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

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

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

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

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

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

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

    if -1.80000000000000006e-83 < z < 2.3000000000000001e-4

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-a}, x\right) \]
    8. Simplified72.3%

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

Alternative 11: 97.0% accurate, 1.3× speedup?

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

\\
\mathsf{fma}\left(\frac{a}{-1 + \left(z - t\right)}, y - z, x\right)
\end{array}
Derivation
  1. Initial program 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} \]
  4. Applied egg-rr98.2%

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

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

Alternative 12: 75.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-15}:\\
\;\;\;\;x - a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.0000000000000006e-15 or 2.3000000000000001e-4 < z

    1. Initial program 97.2%

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

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

        \[\leadsto \color{blue}{x - a} \]
    5. Simplified72.2%

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

    if -8.0000000000000006e-15 < z < 2.3000000000000001e-4

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-a}, x\right) \]
    8. Simplified71.6%

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

Alternative 13: 74.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{-14}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+15}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.3e-14) (- x a) (if (<= z 3.6e+15) (- x (* y a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.3e-14) {
		tmp = x - a;
	} else if (z <= 3.6e+15) {
		tmp = x - (y * a);
	} else {
		tmp = x - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.3d-14)) then
        tmp = x - a
    else if (z <= 3.6d+15) then
        tmp = x - (y * a)
    else
        tmp = x - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.3e-14) {
		tmp = x - a;
	} else if (z <= 3.6e+15) {
		tmp = x - (y * a);
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.3e-14:
		tmp = x - a
	elif z <= 3.6e+15:
		tmp = x - (y * a)
	else:
		tmp = x - a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.3e-14)
		tmp = Float64(x - a);
	elseif (z <= 3.6e+15)
		tmp = Float64(x - Float64(y * a));
	else
		tmp = Float64(x - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.3e-14)
		tmp = x - a;
	elseif (z <= 3.6e+15)
		tmp = x - (y * a);
	else
		tmp = x - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e-14], N[(x - a), $MachinePrecision], If[LessEqual[z, 3.6e+15], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-14}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2999999999999998e-14 or 3.6e15 < z

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

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

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

    if -3.2999999999999998e-14 < z < 3.6e15

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - a \cdot y} \]
      4. lower-*.f6465.5

        \[\leadsto x - \color{blue}{a \cdot y} \]
    8. Simplified65.5%

      \[\leadsto \color{blue}{x - a \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{-14}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+15}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 68.2% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;z \leq 0.00023:\\
\;\;\;\;\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 < -1 or 2.3000000000000001e-4 < z

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

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

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

    if -1 < z < 2.3000000000000001e-4

    1. Initial program 99.1%

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

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

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

      \[\leadsto \mathsf{fma}\left(a, \frac{z}{t + \color{blue}{1}}, x\right) \]
    7. Step-by-step derivation
      1. Simplified60.3%

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, z, x\right)} \]
      4. Simplified58.1%

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

    Alternative 15: 61.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 98.0%

      \[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--.f6459.3

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

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

    Alternative 16: 17.4% 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 98.0%

      \[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--.f6459.3

        \[\leadsto \color{blue}{x - a} \]
    5. Simplified59.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.f6412.8

        \[\leadsto \color{blue}{-a} \]
    8. Simplified12.8%

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