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

Percentage Accurate: 96.9% → 97.2%
Time: 9.1s
Alternatives: 14
Speedup: 1.2×

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.9% 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: 97.2% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.3% 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 -1 \cdot 10^{+293} \lor \neg \left(t\_1 \leq 10^{+289}\right):\\ \;\;\;\;\left(-a\right) \cdot \frac{y}{1}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a))))
   (if (or (<= t_1 -1e+293) (not (<= t_1 1e+289)))
     (* (- a) (/ y 1.0))
     (- x a))))
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 <= -1e+293) || !(t_1 <= 1e+289)) {
		tmp = -a * (y / 1.0);
	} else {
		tmp = x - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) / (((t - z) + 1.0d0) / a)
    if ((t_1 <= (-1d+293)) .or. (.not. (t_1 <= 1d+289))) then
        tmp = -a * (y / 1.0d0)
    else
        tmp = x - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (((t - z) + 1.0) / a);
	double tmp;
	if ((t_1 <= -1e+293) || !(t_1 <= 1e+289)) {
		tmp = -a * (y / 1.0);
	} else {
		tmp = x - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) / (((t - z) + 1.0) / a)
	tmp = 0
	if (t_1 <= -1e+293) or not (t_1 <= 1e+289):
		tmp = -a * (y / 1.0)
	else:
		tmp = x - a
	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 <= -1e+293) || !(t_1 <= 1e+289))
		tmp = Float64(Float64(-a) * Float64(y / 1.0));
	else
		tmp = Float64(x - a);
	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 <= -1e+293) || ~((t_1 <= 1e+289)))
		tmp = -a * (y / 1.0);
	else
		tmp = x - a;
	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[Or[LessEqual[t$95$1, -1e+293], N[Not[LessEqual[t$95$1, 1e+289]], $MachinePrecision]], N[((-a) * N[(y / 1.0), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}

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

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


\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)) < -9.9999999999999992e292 or 1.0000000000000001e289 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right) - z}} \]
      9. lower-+.f64100.0

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

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

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

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

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

          \[\leadsto \left(-a\right) \cdot \frac{y}{1} \]
        3. Step-by-step derivation
          1. Applied rewrites94.4%

            \[\leadsto \left(-a\right) \cdot \frac{y}{1} \]

          if -9.9999999999999992e292 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.0000000000000001e289

          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--.f6468.3

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

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

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

        Alternative 3: 63.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 -1 \cdot 10^{+293} \lor \neg \left(t\_1 \leq 10^{+289}\right):\\ \;\;\;\;y \cdot \mathsf{fma}\left(t, a, -a\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a))))
           (if (or (<= t_1 -1e+293) (not (<= t_1 1e+289)))
             (* y (fma t a (- a)))
             (- x a))))
        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 <= -1e+293) || !(t_1 <= 1e+289)) {
        		tmp = y * fma(t, a, -a);
        	} else {
        		tmp = x - a;
        	}
        	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 <= -1e+293) || !(t_1 <= 1e+289))
        		tmp = Float64(y * fma(t, a, Float64(-a)));
        	else
        		tmp = Float64(x - a);
        	end
        	return 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[Or[LessEqual[t$95$1, -1e+293], N[Not[LessEqual[t$95$1, 1e+289]], $MachinePrecision]], N[(y * N[(t * a + (-a)), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+293} \lor \neg \left(t\_1 \leq 10^{+289}\right):\\
        \;\;\;\;y \cdot \mathsf{fma}\left(t, a, -a\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x - a\\
        
        
        \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)) < -9.9999999999999992e292 or 1.0000000000000001e289 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right) - z}} \]
            9. lower-+.f64100.0

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

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

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

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

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

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

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

                if -9.9999999999999992e292 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.0000000000000001e289

                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--.f6468.3

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

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

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

              Alternative 4: 70.8% accurate, 0.9× speedup?

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

                1. Initial program 96.8%

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

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

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

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

                if -2.55000000000000018e30 < z < 6.1999999999999996e-94

                1. Initial program 99.2%

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

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

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

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

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

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

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

                  \[\leadsto x - \frac{a \cdot y}{t} \]
                7. Step-by-step derivation
                  1. Applied rewrites73.2%

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

                  if 6.1999999999999996e-94 < z < 44000

                  1. Initial program 99.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. fp-cancel-sub-sign-invN/A

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

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

                      \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                    4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

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

                  Alternative 5: 63.0% accurate, 0.9× speedup?

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

                    1. Initial program 97.4%

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

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

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

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

                    if -3.6000000000000001e42 < z < 6.4000000000000003e-249

                    1. Initial program 99.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. fp-cancel-sub-sign-invN/A

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

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

                        \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                      4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

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

                      if 6.4000000000000003e-249 < z < 8.1999999999999995e-166

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 6: 88.9% accurate, 1.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+40} \lor \neg \left(z \leq 21000\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= z -4.6e+40) (not (<= z 21000.0)))
                             (fma (/ z (- (+ 1.0 t) z)) a x)
                             (- x (* (/ y (+ 1.0 t)) a))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((z <= -4.6e+40) || !(z <= 21000.0)) {
                          		tmp = fma((z / ((1.0 + t) - z)), a, x);
                          	} else {
                          		tmp = x - ((y / (1.0 + t)) * a);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((z <= -4.6e+40) || !(z <= 21000.0))
                          		tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x);
                          	else
                          		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.6e+40], N[Not[LessEqual[z, 21000.0]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -4.6 \cdot 10^{+40} \lor \neg \left(z \leq 21000\right):\\
                          \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -4.59999999999999987e40 or 21000 < z

                            1. Initial program 96.6%

                              \[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. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                              4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

                            if -4.59999999999999987e40 < z < 21000

                            1. Initial program 99.4%

                              \[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. associate-/l*N/A

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

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

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

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

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

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

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

                          Alternative 7: 88.3% accurate, 1.0× speedup?

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

                            1. Initial program 95.2%

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

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

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

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

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

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

                                \[\leadsto x - \left(y - z\right) \cdot \color{blue}{\frac{a}{1 - z}} \]
                              6. lower--.f6494.2

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

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

                            if -3.19999999999999981e40 < z < 21000

                            1. Initial program 99.4%

                              \[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. associate-/l*N/A

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

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

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

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

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

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

                            if 21000 < z

                            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. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                              4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

                          Alternative 8: 86.5% accurate, 1.0× speedup?

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

                            1. Initial program 95.2%

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

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

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

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

                            if -1.3000000000000001e43 < z < 21000

                            1. Initial program 99.4%

                              \[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. associate-/l*N/A

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

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

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

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

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

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

                            if 21000 < z

                            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. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                              4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

                            Alternative 9: 85.1% accurate, 1.0× speedup?

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

                              1. Initial program 95.2%

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

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

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

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

                              if -1.3000000000000001e43 < z < 46000

                              1. Initial program 99.4%

                                \[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. associate-/l*N/A

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

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

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

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

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

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

                              if 46000 < z

                              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. fp-cancel-sub-sign-invN/A

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

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

                                  \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                                4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

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

                              Alternative 10: 70.2% accurate, 1.1× speedup?

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

                                1. Initial program 95.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--.f6487.7

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

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

                                if -2.55000000000000018e30 < z < 3.5e-92

                                1. Initial program 99.2%

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

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

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

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

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

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

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

                                  \[\leadsto x - \frac{a \cdot y}{t} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites73.2%

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

                                  if 3.5e-92 < z

                                  1. Initial program 98.7%

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

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

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

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

                                      \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                                    4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

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

                                  Alternative 11: 70.4% accurate, 1.1× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+30} \lor \neg \left(z \leq 46000\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a \cdot y}{t}\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (if (or (<= z -2.55e+30) (not (<= z 46000.0))) (- x a) (- x (/ (* a y) t))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double tmp;
                                  	if ((z <= -2.55e+30) || !(z <= 46000.0)) {
                                  		tmp = x - a;
                                  	} else {
                                  		tmp = x - ((a * y) / t);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(x, y, z, t, a)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8) :: tmp
                                      if ((z <= (-2.55d+30)) .or. (.not. (z <= 46000.0d0))) then
                                          tmp = x - a
                                      else
                                          tmp = x - ((a * y) / t)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a) {
                                  	double tmp;
                                  	if ((z <= -2.55e+30) || !(z <= 46000.0)) {
                                  		tmp = x - a;
                                  	} else {
                                  		tmp = x - ((a * y) / t);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	tmp = 0
                                  	if (z <= -2.55e+30) or not (z <= 46000.0):
                                  		tmp = x - a
                                  	else:
                                  		tmp = x - ((a * y) / t)
                                  	return tmp
                                  
                                  function code(x, y, z, t, a)
                                  	tmp = 0.0
                                  	if ((z <= -2.55e+30) || !(z <= 46000.0))
                                  		tmp = Float64(x - a);
                                  	else
                                  		tmp = Float64(x - Float64(Float64(a * y) / t));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a)
                                  	tmp = 0.0;
                                  	if ((z <= -2.55e+30) || ~((z <= 46000.0)))
                                  		tmp = x - a;
                                  	else
                                  		tmp = x - ((a * y) / t);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.55e+30], N[Not[LessEqual[z, 46000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;z \leq -2.55 \cdot 10^{+30} \lor \neg \left(z \leq 46000\right):\\
                                  \;\;\;\;x - a\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x - \frac{a \cdot y}{t}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -2.55000000000000018e30 or 46000 < z

                                    1. Initial program 96.8%

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

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

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

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

                                    if -2.55000000000000018e30 < z < 46000

                                    1. Initial program 99.3%

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

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

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

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

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

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

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

                                      \[\leadsto x - \frac{a \cdot y}{t} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites68.3%

                                        \[\leadsto x - \frac{a \cdot y}{t} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification76.8%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+30} \lor \neg \left(z \leq 46000\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a \cdot y}{t}\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 12: 65.6% accurate, 1.2× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+133} \lor \neg \left(t \leq 7 \cdot 10^{+68}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (if (or (<= t -2.3e+133) (not (<= t 7e+68))) (fma (/ z t) a x) (- x a)))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double tmp;
                                    	if ((t <= -2.3e+133) || !(t <= 7e+68)) {
                                    		tmp = fma((z / t), a, x);
                                    	} else {
                                    		tmp = x - a;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a)
                                    	tmp = 0.0
                                    	if ((t <= -2.3e+133) || !(t <= 7e+68))
                                    		tmp = fma(Float64(z / t), a, x);
                                    	else
                                    		tmp = Float64(x - a);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.3e+133], N[Not[LessEqual[t, 7e+68]], $MachinePrecision]], N[(N[(z / t), $MachinePrecision] * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;t \leq -2.3 \cdot 10^{+133} \lor \neg \left(t \leq 7 \cdot 10^{+68}\right):\\
                                    \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, a, x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x - a\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if t < -2.2999999999999999e133 or 6.99999999999999955e68 < t

                                      1. Initial program 99.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. fp-cancel-sub-sign-invN/A

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

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

                                          \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                                        4. *-lft-identityN/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. *-commutativeN/A

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

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

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

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

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

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

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

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

                                        if -2.2999999999999999e133 < t < 6.99999999999999955e68

                                        1. Initial program 97.8%

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+133} \lor \neg \left(t \leq 7 \cdot 10^{+68}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 13: 60.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 98.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--.f6464.2

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

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

                                      Alternative 14: 16.7% accurate, 11.7× speedup?

                                      \[\begin{array}{l} \\ -a \end{array} \]
                                      (FPCore (x y z t a) :precision binary64 (- a))
                                      double code(double x, double y, double z, double t, double a) {
                                      	return -a;
                                      }
                                      
                                      real(8) function code(x, y, z, t, a)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          real(8), intent (in) :: z
                                          real(8), intent (in) :: t
                                          real(8), intent (in) :: a
                                          code = -a
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a) {
                                      	return -a;
                                      }
                                      
                                      def code(x, y, z, t, a):
                                      	return -a
                                      
                                      function code(x, y, z, t, a)
                                      	return Float64(-a)
                                      end
                                      
                                      function tmp = code(x, y, z, t, a)
                                      	tmp = -a;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := (-a)
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      -a
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 98.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--.f6464.2

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

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

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

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

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

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

                                        Reproduce

                                        ?
                                        herbie shell --seed 2024338 
                                        (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))))