Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A

Percentage Accurate: 85.4% → 99.6%
Time: 8.9s
Alternatives: 11
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (z - a));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{z - 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 11 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: 85.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (z - a));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;x - \frac{t\_2}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 5.0000000000000004e286 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 36.8%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
      6. lower-/.f64N/A

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
      7. lower-/.f6499.7

        \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{z - a}{y}}}{z - t}} \]
    4. Applied rewrites99.7%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000004e286

    1. Initial program 99.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

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

Alternative 2: 96.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;x - \frac{t\_1}{z - a}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a - z} \cdot \left(t - z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0

    1. Initial program 40.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot \frac{y}{x}, \frac{\color{blue}{z - t}}{z - a}, x\right) \]
      11. lower--.f6491.3

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000004e286

    1. Initial program 99.8%

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

    if 5.0000000000000004e286 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 34.4%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{z - a} - \color{blue}{t \cdot \frac{y}{z - a}} \]
      8. distribute-rgt-out--N/A

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

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

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

        \[\leadsto \frac{y}{\color{blue}{z - a}} \cdot \left(z - t\right) \]
      12. lower--.f6490.8

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

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

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

Alternative 3: 96.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;x - \frac{t\_2}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 5.0000000000000004e286 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 36.8%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{z - a} - \color{blue}{t \cdot \frac{y}{z - a}} \]
      8. distribute-rgt-out--N/A

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000004e286

    1. Initial program 99.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification97.6%

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

Alternative 4: 76.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+61}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq -0.00062:\\
\;\;\;\;\frac{y}{z} \cdot \left(z - t\right)\\

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

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.50000000000000035e61 or 2.19999999999999992e-12 < z

    1. Initial program 78.5%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y + x} \]
      2. lower-+.f6481.4

        \[\leadsto \color{blue}{y + x} \]
    5. Applied rewrites81.4%

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

    if -8.50000000000000035e61 < z < -6.2e-4

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{z - a} - \color{blue}{t \cdot \frac{y}{z - a}} \]
      8. distribute-rgt-out--N/A

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

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

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

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

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

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

      \[\leadsto \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
    7. Step-by-step derivation
      1. Applied rewrites76.1%

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

      if -6.2e-4 < z < 2.19999999999999992e-12

      1. Initial program 93.8%

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

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

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

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

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

          \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
        6. lower-/.f64N/A

          \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
        7. lower-/.f6495.3

          \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{z - a}{y}}}{z - t}} \]
      4. Applied rewrites95.3%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
      5. Taylor expanded in z around 0

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      6. Step-by-step derivation
        1. associate-/l*N/A

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

          \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
        3. lower-/.f6475.4

          \[\leadsto x + t \cdot \color{blue}{\frac{y}{a}} \]
      7. Applied rewrites75.4%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification78.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+61}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -0.00062:\\ \;\;\;\;\frac{y}{z} \cdot \left(z - t\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{a} \cdot t + x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    10. Add Preprocessing

    Alternative 5: 76.0% accurate, 0.7× speedup?

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

      1. Initial program 78.5%

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

        \[\leadsto \color{blue}{x + y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{y + x} \]
        2. lower-+.f6481.4

          \[\leadsto \color{blue}{y + x} \]
      5. Applied rewrites81.4%

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

      if -8.50000000000000035e61 < z < -6.2e-4

      1. Initial program 83.2%

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

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

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

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

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

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

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

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

          \[\leadsto z \cdot \frac{y}{z - a} - \color{blue}{t \cdot \frac{y}{z - a}} \]
        8. distribute-rgt-out--N/A

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

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

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

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

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

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

        \[\leadsto \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
      7. Step-by-step derivation
        1. Applied rewrites76.1%

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

        if -6.2e-4 < z < 2.19999999999999992e-12

        1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

      Alternative 6: 82.2% accurate, 0.7× speedup?

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

        1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

        if -3.0000000000000002e-119 < z < 2.70000000000000029e-138

        1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{z - t}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
          10. lower-neg.f6489.9

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

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

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

      Alternative 7: 81.8% accurate, 0.8× speedup?

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

        1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

        if -8.60000000000000037e-122 < z < 2.70000000000000029e-138

        1. Initial program 92.3%

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

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

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

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

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

            \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
          6. lower-/.f64N/A

            \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
          7. lower-/.f6494.3

            \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{z - a}{y}}}{z - t}} \]
        4. Applied rewrites94.3%

          \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
        6. Step-by-step derivation
          1. associate-/l*N/A

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

            \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
          3. lower-/.f6486.8

            \[\leadsto x + t \cdot \color{blue}{\frac{y}{a}} \]
        7. Applied rewrites86.8%

          \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification84.9%

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

      Alternative 8: 81.5% accurate, 0.8× speedup?

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

        1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

        if -1.02e-118 < z < 2.1e-120

        1. Initial program 91.7%

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

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

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

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

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

            \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
          6. lower-/.f64N/A

            \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
          7. lower-/.f6494.6

            \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{z - a}{y}}}{z - t}} \]
        4. Applied rewrites94.6%

          \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
        5. Taylor expanded in z around 0

          \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
        6. Step-by-step derivation
          1. associate-/l*N/A

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

            \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
          3. lower-/.f6485.2

            \[\leadsto x + t \cdot \color{blue}{\frac{y}{a}} \]
        7. Applied rewrites85.2%

          \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification79.8%

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

      Alternative 9: 79.5% accurate, 0.8× speedup?

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

        1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

          if -8.60000000000000037e-122 < z < 2.30000000000000021e-118

          1. Initial program 91.8%

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

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

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

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

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

              \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
            6. lower-/.f64N/A

              \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
            7. lower-/.f6494.1

              \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{z - a}{y}}}{z - t}} \]
          4. Applied rewrites94.1%

            \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{z - a}{y}}{z - t}}} \]
          5. Taylor expanded in z around 0

            \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
          6. Step-by-step derivation
            1. associate-/l*N/A

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

              \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
            3. lower-/.f6484.4

              \[\leadsto x + t \cdot \color{blue}{\frac{y}{a}} \]
          7. Applied rewrites84.4%

            \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification78.8%

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

        Alternative 10: 77.4% accurate, 0.9× speedup?

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

          1. Initial program 79.1%

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

            \[\leadsto \color{blue}{x + y} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{y + x} \]
            2. lower-+.f6477.1

              \[\leadsto \color{blue}{y + x} \]
          5. Applied rewrites77.1%

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

          if -4.6000000000000002e-8 < z < 2.19999999999999992e-12

          1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

        Alternative 11: 61.6% accurate, 6.5× speedup?

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

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

          \[\leadsto \color{blue}{x + y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y + x} \]
          2. lower-+.f6462.5

            \[\leadsto \color{blue}{y + x} \]
        5. Applied rewrites62.5%

          \[\leadsto \color{blue}{y + x} \]
        6. Final simplification62.5%

          \[\leadsto x + y \]
        7. Add Preprocessing

        Developer Target 1: 98.4% accurate, 0.8× speedup?

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

        Reproduce

        ?
        herbie shell --seed 2024277 
        (FPCore (x y z t a)
          :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
          :precision binary64
        
          :alt
          (! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
        
          (+ x (/ (* y (- z t)) (- z a))))