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

Percentage Accurate: 96.8% → 99.7%
Time: 10.7s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 96.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 71.8% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -1.0000000000000001e302 or 4.9999999999999997e162 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a \cdot \left(y - z\right)}{z + \color{blue}{\left(-1 - t\right)}} \]
      13. lower--.f6474.6

        \[\leadsto \frac{a \cdot \left(y - z\right)}{z + \color{blue}{\left(-1 - t\right)}} \]
    7. Applied rewrites74.6%

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

      \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
    9. Step-by-step derivation
      1. Applied rewrites69.9%

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

      if -1.0000000000000001e302 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 4.9999999999999997e162

      1. Initial program 97.3%

        \[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--.f6480.6

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

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

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

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

      Alternative 3: 65.3% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \frac{y}{-1 - t}\\ t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+302}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+162}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (* a (/ y (- -1.0 t)))) (t_2 (/ (- y z) (/ (+ (- t z) 1.0) a))))
         (if (<= t_2 -1e+302) t_1 (if (<= t_2 5e+162) (- x a) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = a * (y / (-1.0 - t));
      	double t_2 = (y - z) / (((t - z) + 1.0) / a);
      	double tmp;
      	if (t_2 <= -1e+302) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+162) {
      		tmp = x - a;
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = a * (y / ((-1.0d0) - t))
          t_2 = (y - z) / (((t - z) + 1.0d0) / a)
          if (t_2 <= (-1d+302)) then
              tmp = t_1
          else if (t_2 <= 5d+162) then
              tmp = x - a
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = a * (y / (-1.0 - t));
      	double t_2 = (y - z) / (((t - z) + 1.0) / a);
      	double tmp;
      	if (t_2 <= -1e+302) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+162) {
      		tmp = x - a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = a * (y / (-1.0 - t))
      	t_2 = (y - z) / (((t - z) + 1.0) / a)
      	tmp = 0
      	if t_2 <= -1e+302:
      		tmp = t_1
      	elif t_2 <= 5e+162:
      		tmp = x - a
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(a * Float64(y / Float64(-1.0 - t)))
      	t_2 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
      	tmp = 0.0
      	if (t_2 <= -1e+302)
      		tmp = t_1;
      	elseif (t_2 <= 5e+162)
      		tmp = Float64(x - a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = a * (y / (-1.0 - t));
      	t_2 = (y - z) / (((t - z) + 1.0) / a);
      	tmp = 0.0;
      	if (t_2 <= -1e+302)
      		tmp = t_1;
      	elseif (t_2 <= 5e+162)
      		tmp = x - a;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+302], t$95$1, If[LessEqual[t$95$2, 5e+162], N[(x - a), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := a \cdot \frac{y}{-1 - t}\\
      t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
      \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+302}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+162}:\\
      \;\;\;\;x - a\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -1.0000000000000001e302 or 4.9999999999999997e162 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{a \cdot \left(y - z\right)}{z + \color{blue}{\left(-1 - t\right)}} \]
          13. lower--.f6474.6

            \[\leadsto \frac{a \cdot \left(y - z\right)}{z + \color{blue}{\left(-1 - t\right)}} \]
        7. Applied rewrites74.6%

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

          \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
        9. Step-by-step derivation
          1. Applied rewrites69.9%

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

          if -1.0000000000000001e302 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 4.9999999999999997e162

          1. Initial program 97.3%

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

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

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

            \[\leadsto \color{blue}{x - a} \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 4: 61.7% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+306}:\\ \;\;\;\;\frac{y}{z} \cdot a\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+158}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{a}{z}\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a))))
           (if (<= t_1 -2e+306)
             (* (/ y z) a)
             (if (<= t_1 2e+158) (- x a) (* y (/ a z))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = (y - z) / (((t - z) + 1.0) / a);
        	double tmp;
        	if (t_1 <= -2e+306) {
        		tmp = (y / z) * a;
        	} else if (t_1 <= 2e+158) {
        		tmp = x - a;
        	} else {
        		tmp = y * (a / z);
        	}
        	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) :: t_1
            real(8) :: tmp
            t_1 = (y - z) / (((t - z) + 1.0d0) / a)
            if (t_1 <= (-2d+306)) then
                tmp = (y / z) * a
            else if (t_1 <= 2d+158) then
                tmp = x - a
            else
                tmp = y * (a / z)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = (y - z) / (((t - z) + 1.0) / a);
        	double tmp;
        	if (t_1 <= -2e+306) {
        		tmp = (y / z) * a;
        	} else if (t_1 <= 2e+158) {
        		tmp = x - a;
        	} else {
        		tmp = y * (a / z);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = (y - z) / (((t - z) + 1.0) / a)
        	tmp = 0
        	if t_1 <= -2e+306:
        		tmp = (y / z) * a
        	elif t_1 <= 2e+158:
        		tmp = x - a
        	else:
        		tmp = y * (a / z)
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
        	tmp = 0.0
        	if (t_1 <= -2e+306)
        		tmp = Float64(Float64(y / z) * a);
        	elseif (t_1 <= 2e+158)
        		tmp = Float64(x - a);
        	else
        		tmp = Float64(y * Float64(a / z));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = (y - z) / (((t - z) + 1.0) / a);
        	tmp = 0.0;
        	if (t_1 <= -2e+306)
        		tmp = (y / z) * a;
        	elseif (t_1 <= 2e+158)
        		tmp = x - a;
        	else
        		tmp = y * (a / z);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+306], N[(N[(y / z), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t$95$1, 2e+158], N[(x - a), $MachinePrecision], N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+306}:\\
        \;\;\;\;\frac{y}{z} \cdot a\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+158}:\\
        \;\;\;\;x - a\\
        
        \mathbf{else}:\\
        \;\;\;\;y \cdot \frac{a}{z}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -2.00000000000000003e306

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{a \cdot y}{z + \color{blue}{\left(-1 - t\right)}} \]
            10. lower--.f6491.5

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

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

            \[\leadsto \frac{a \cdot y}{\color{blue}{z}} \]
          9. Step-by-step derivation
            1. Applied rewrites61.5%

              \[\leadsto \frac{a \cdot y}{\color{blue}{z}} \]
            2. Step-by-step derivation
              1. Applied rewrites61.5%

                \[\leadsto \frac{y}{z} \cdot a \]

              if -2.00000000000000003e306 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.99999999999999991e158

              1. Initial program 97.3%

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

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

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

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

              if 1.99999999999999991e158 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a \cdot y}{z + \color{blue}{\left(-1 - t\right)}} \]
              7. Applied rewrites57.7%

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

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

                  \[\leadsto y \cdot \frac{a}{\color{blue}{z}} \]
                3. Step-by-step derivation
                  1. Applied rewrites33.7%

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

                Alternative 5: 61.7% accurate, 0.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot a\\ t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+158}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (let* ((t_1 (* (/ y z) a)) (t_2 (/ (- y z) (/ (+ (- t z) 1.0) a))))
                   (if (<= t_2 -2e+306) t_1 (if (<= t_2 2e+158) (- x a) t_1))))
                double code(double x, double y, double z, double t, double a) {
                	double t_1 = (y / z) * a;
                	double t_2 = (y - z) / (((t - z) + 1.0) / a);
                	double tmp;
                	if (t_2 <= -2e+306) {
                		tmp = t_1;
                	} else if (t_2 <= 2e+158) {
                		tmp = x - a;
                	} else {
                		tmp = t_1;
                	}
                	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) :: t_1
                    real(8) :: t_2
                    real(8) :: tmp
                    t_1 = (y / z) * a
                    t_2 = (y - z) / (((t - z) + 1.0d0) / a)
                    if (t_2 <= (-2d+306)) then
                        tmp = t_1
                    else if (t_2 <= 2d+158) then
                        tmp = x - a
                    else
                        tmp = t_1
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	double t_1 = (y / z) * a;
                	double t_2 = (y - z) / (((t - z) + 1.0) / a);
                	double tmp;
                	if (t_2 <= -2e+306) {
                		tmp = t_1;
                	} else if (t_2 <= 2e+158) {
                		tmp = x - a;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	t_1 = (y / z) * a
                	t_2 = (y - z) / (((t - z) + 1.0) / a)
                	tmp = 0
                	if t_2 <= -2e+306:
                		tmp = t_1
                	elif t_2 <= 2e+158:
                		tmp = x - a
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a)
                	t_1 = Float64(Float64(y / z) * a)
                	t_2 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
                	tmp = 0.0
                	if (t_2 <= -2e+306)
                		tmp = t_1;
                	elseif (t_2 <= 2e+158)
                		tmp = Float64(x - a);
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	t_1 = (y / z) * a;
                	t_2 = (y - z) / (((t - z) + 1.0) / a);
                	tmp = 0.0;
                	if (t_2 <= -2e+306)
                		tmp = t_1;
                	elseif (t_2 <= 2e+158)
                		tmp = x - a;
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+306], t$95$1, If[LessEqual[t$95$2, 2e+158], N[(x - a), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{y}{z} \cdot a\\
                t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
                \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+158}:\\
                \;\;\;\;x - a\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -2.00000000000000003e306 or 1.99999999999999991e158 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{a \cdot y}{z + \color{blue}{\left(-1 - t\right)}} \]
                    10. lower--.f6467.4

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

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

                    \[\leadsto \frac{a \cdot y}{\color{blue}{z}} \]
                  9. Step-by-step derivation
                    1. Applied rewrites33.7%

                      \[\leadsto \frac{a \cdot y}{\color{blue}{z}} \]
                    2. Step-by-step derivation
                      1. Applied rewrites41.6%

                        \[\leadsto \frac{y}{z} \cdot a \]

                      if -2.00000000000000003e306 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.99999999999999991e158

                      1. Initial program 97.3%

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

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

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

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

                    Alternative 6: 92.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1e12 < t < 4.49999999999999959e59

                      1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 88.5% accurate, 1.0× speedup?

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

                      1. Initial program 96.9%

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

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

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

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

                        if -1.65e12 < t < 1.9999999999999999e60

                        1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.9999999999999999e60 < t

                        1. Initial program 97.9%

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

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

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

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

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

                            \[\leadsto x - y \cdot \color{blue}{\frac{a}{1 + t}} \]
                          5. lower-+.f6485.8

                            \[\leadsto x - y \cdot \frac{a}{\color{blue}{1 + t}} \]
                        5. Applied rewrites85.8%

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

                      Alternative 8: 89.1% accurate, 1.0× speedup?

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

                        1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

                          if -6e5 < z < 3.7000000000000002e55

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 88.8% accurate, 1.0× speedup?

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

                          1. Initial program 97.5%

                            \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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--.f6487.4

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

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

                          if -9.6e5 < z < 3.5000000000000001e55

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 85.3% accurate, 1.1× speedup?

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

                          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--.f6488.0

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

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

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

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

                            if -1.02e6 < z < 1.10000000000000008e56

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.10000000000000008e56 < z

                            1. Initial program 96.1%

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

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

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

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

                          Alternative 11: 69.0% accurate, 1.1× speedup?

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

                            1. Initial program 96.9%

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

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

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

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

                            if -1.65e38 < z < 1.6e148

                            1. Initial program 98.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--.f6463.3

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

                              \[\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}{1 + \color{blue}{t}}, x\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites60.6%

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

                            Alternative 12: 64.1% accurate, 1.5× speedup?

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

                              1. Initial program 96.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--.f6483.5

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

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

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

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

                                if -1.2e75 < t

                                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--.f6460.5

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

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

                              Alternative 13: 61.7% accurate, 8.8× speedup?

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

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

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

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

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

                              Alternative 14: 16.8% accurate, 11.7× speedup?

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

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

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

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

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

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

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

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

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

                                Reproduce

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