Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B

Percentage Accurate: 77.2% → 87.8%
Time: 9.7s
Alternatives: 12
Speedup: 0.9×

Specification

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

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

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

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

Alternative 1: 87.8% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.4999999999999997e152 or 1.32e69 < t

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4999999999999997e152 < t < 1.32e69

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(\mathsf{neg}\left(y\right)\right), \frac{1}{\color{blue}{a - t}}, x + y\right) \]
      12. +-lowering-+.f6489.0

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

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

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

Alternative 2: 87.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+64}:\\
\;\;\;\;\left(y + x\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2000000000000001e153 or 7.5000000000000005e64 < t

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e153 < t < 7.5000000000000005e64

    1. Initial program 88.8%

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

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

Alternative 3: 83.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{-91}:\\
\;\;\;\;\left(y + x\right) - z \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15999999999999994e-91

    1. Initial program 81.7%

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

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

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

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

        \[\leadsto \left(x + y\right) - \color{blue}{z \cdot \frac{y}{a}} \]
      4. /-lowering-/.f6487.4

        \[\leadsto \left(x + y\right) - z \cdot \color{blue}{\frac{y}{a}} \]
    5. Simplified87.4%

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

    if -1.15999999999999994e-91 < a < 6.8000000000000006e-30

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(\mathsf{neg}\left(y\right)\right), \frac{1}{\color{blue}{a - t}}, x + y\right) \]
      12. +-lowering-+.f6474.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
      13. /-lowering-/.f64N/A

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

        \[\leadsto x + \frac{y \cdot z - \color{blue}{y \cdot a}}{t} \]
      15. distribute-lft-out--N/A

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

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(z - a\right)}}{t} \]
      17. --lowering--.f6489.0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(z - a\right)}}{t} \]
    7. Simplified89.0%

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

    if 6.8000000000000006e-30 < a

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.4999999999999999e-91 or 8.000000000000001e-30 < a

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{1 - \frac{z}{a}}, x\right) \]
      8. /-lowering-/.f6487.0

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

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

    if -3.4999999999999999e-91 < a < 8.000000000000001e-30

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(\mathsf{neg}\left(y\right)\right), \frac{1}{\color{blue}{a - t}}, x + y\right) \]
      12. +-lowering-+.f6474.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot z - a \cdot y}{t}} \]
      13. /-lowering-/.f64N/A

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

        \[\leadsto x + \frac{y \cdot z - \color{blue}{y \cdot a}}{t} \]
      15. distribute-lft-out--N/A

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

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(z - a\right)}}{t} \]
      17. --lowering--.f6489.0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(z - a\right)}}{t} \]
    7. Simplified89.0%

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

Alternative 5: 83.9% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.9999999999999997e-90 or 5.89999999999999979e-30 < a

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{1 - \frac{z}{a}}, x\right) \]
      8. /-lowering-/.f6487.0

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

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

    if -6.9999999999999997e-90 < a < 5.89999999999999979e-30

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.69999999999999988e-89 or 5.89999999999999979e-30 < a

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{1 - \frac{z}{a}}, x\right) \]
      8. /-lowering-/.f6487.0

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

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

    if -2.69999999999999988e-89 < a < 5.89999999999999979e-30

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(\mathsf{neg}\left(y\right)\right), \frac{1}{\color{blue}{a - t}}, x + y\right) \]
      12. +-lowering-+.f6474.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{0} \cdot y + \frac{y \cdot z}{t}\right) + x \]
      14. mul0-lftN/A

        \[\leadsto \left(\color{blue}{0} + \frac{y \cdot z}{t}\right) + x \]
      15. +-lft-identityN/A

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)} \]
      18. /-lowering-/.f6485.0

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

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

Alternative 7: 76.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-41}:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.79999999999999955e-41 or 3.3999999999999998e84 < a

    1. Initial program 83.1%

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

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

        \[\leadsto \color{blue}{y + x} \]
      2. +-lowering-+.f6479.3

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified79.3%

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

    if -5.79999999999999955e-41 < a < 3.3999999999999998e84

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(\mathsf{neg}\left(y\right)\right), \frac{1}{\color{blue}{a - t}}, x + y\right) \]
      12. +-lowering-+.f6475.2

        \[\leadsto \mathsf{fma}\left(\left(z - t\right) \cdot \left(-y\right), \frac{1}{a - t}, \color{blue}{x + y}\right) \]
    4. Applied egg-rr75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{0} \cdot y + \frac{y \cdot z}{t}\right) + x \]
      14. mul0-lftN/A

        \[\leadsto \left(\color{blue}{0} + \frac{y \cdot z}{t}\right) + x \]
      15. +-lft-identityN/A

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)} \]
      18. /-lowering-/.f6477.7

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

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

Alternative 8: 60.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-127}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 4.45 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.85e-127) (+ y x) (if (<= a 4.45e-299) (* y (/ z t)) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.85e-127) {
		tmp = y + x;
	} else if (a <= 4.45e-299) {
		tmp = y * (z / t);
	} else {
		tmp = y + x;
	}
	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 (a <= (-1.85d-127)) then
        tmp = y + x
    else if (a <= 4.45d-299) then
        tmp = y * (z / t)
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.85e-127) {
		tmp = y + x;
	} else if (a <= 4.45e-299) {
		tmp = y * (z / t);
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.85e-127:
		tmp = y + x
	elif a <= 4.45e-299:
		tmp = y * (z / t)
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.85e-127)
		tmp = Float64(y + x);
	elseif (a <= 4.45e-299)
		tmp = Float64(y * Float64(z / t));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.85e-127)
		tmp = y + x;
	elseif (a <= 4.45e-299)
		tmp = y * (z / t);
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-127], N[(y + x), $MachinePrecision], If[LessEqual[a, 4.45e-299], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-127}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq 4.45 \cdot 10^{-299}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8500000000000002e-127 or 4.4500000000000002e-299 < a

    1. Initial program 79.1%

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

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

        \[\leadsto \color{blue}{y + x} \]
      2. +-lowering-+.f6467.0

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified67.0%

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

    if -1.8500000000000002e-127 < a < 4.4500000000000002e-299

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + \color{blue}{y \cdot \frac{z - t}{t}} \]
      2. div-subN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0} \cdot y + \frac{y \cdot z}{t} \]
      13. mul0-lftN/A

        \[\leadsto \color{blue}{0} + \frac{y \cdot z}{t} \]
      14. +-lft-identityN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
      17. /-lowering-/.f6462.6

        \[\leadsto y \cdot \color{blue}{\frac{z}{t}} \]
    8. Simplified62.6%

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

Alternative 9: 52.8% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+188}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+35}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1e188 or 1.49999999999999995e35 < y

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
    7. Step-by-step derivation
      1. Simplified31.8%

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

      if -1e188 < y < 1.49999999999999995e35

      1. Initial program 85.4%

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

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified65.0%

          \[\leadsto \color{blue}{x} \]
      5. Recombined 2 regimes into one program.
      6. Add Preprocessing

      Alternative 10: 62.7% accurate, 2.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+176}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
      (FPCore (x y z t a) :precision binary64 (if (<= t -7e+176) x (+ y x)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -7e+176) {
      		tmp = x;
      	} else {
      		tmp = y + x;
      	}
      	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 (t <= (-7d+176)) then
              tmp = x
          else
              tmp = y + x
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -7e+176) {
      		tmp = x;
      	} else {
      		tmp = y + x;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if t <= -7e+176:
      		tmp = x
      	else:
      		tmp = y + x
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= -7e+176)
      		tmp = x;
      	else
      		tmp = Float64(y + x);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (t <= -7e+176)
      		tmp = x;
      	else
      		tmp = y + x;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+176], x, N[(y + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -7 \cdot 10^{+176}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;y + x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -7.00000000000000005e176

        1. Initial program 44.5%

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

          \[\leadsto \color{blue}{x} \]
        4. Step-by-step derivation
          1. Simplified60.1%

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

          if -7.00000000000000005e176 < t

          1. Initial program 83.7%

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

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

              \[\leadsto \color{blue}{y + x} \]
            2. +-lowering-+.f6464.0

              \[\leadsto \color{blue}{y + x} \]
          5. Simplified64.0%

            \[\leadsto \color{blue}{y + x} \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 11: 51.6% accurate, 29.0× speedup?

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

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

          \[\leadsto \color{blue}{x} \]
        4. Step-by-step derivation
          1. Simplified48.8%

            \[\leadsto \color{blue}{x} \]
          2. Add Preprocessing

          Alternative 12: 2.7% accurate, 29.0× speedup?

          \[\begin{array}{l} \\ 0 \end{array} \]
          (FPCore (x y z t a) :precision binary64 0.0)
          double code(double x, double y, double z, double t, double a) {
          	return 0.0;
          }
          
          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 = 0.0d0
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	return 0.0;
          }
          
          def code(x, y, z, t, a):
          	return 0.0
          
          function code(x, y, z, t, a)
          	return 0.0
          end
          
          function tmp = code(x, y, z, t, a)
          	tmp = 0.0;
          end
          
          code[x_, y_, z_, t_, a_] := 0.0
          
          \begin{array}{l}
          
          \\
          0
          \end{array}
          
          Derivation
          1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{y + -1 \cdot y} \]
          7. Step-by-step derivation
            1. distribute-rgt1-inN/A

              \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot y} \]
            2. metadata-evalN/A

              \[\leadsto \color{blue}{0} \cdot y \]
            3. mul0-lft2.8

              \[\leadsto \color{blue}{0} \]
          8. Simplified2.8%

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

          Developer Target 1: 88.3% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\ t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\ \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
                  (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
             (if (< t_2 -1.3664970889390727e-7)
               t_1
               (if (< t_2 1.4754293444577233e-239)
                 (/ (- (* y (- a z)) (* x t)) (- a t))
                 t_1))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
          	double t_2 = (x + y) - (((z - t) * y) / (a - t));
          	double tmp;
          	if (t_2 < -1.3664970889390727e-7) {
          		tmp = t_1;
          	} else if (t_2 < 1.4754293444577233e-239) {
          		tmp = ((y * (a - z)) - (x * t)) / (a - t);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: t_1
              real(8) :: t_2
              real(8) :: tmp
              t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
              t_2 = (x + y) - (((z - t) * y) / (a - t))
              if (t_2 < (-1.3664970889390727d-7)) then
                  tmp = t_1
              else if (t_2 < 1.4754293444577233d-239) then
                  tmp = ((y * (a - z)) - (x * t)) / (a - t)
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
          	double t_2 = (x + y) - (((z - t) * y) / (a - t));
          	double tmp;
          	if (t_2 < -1.3664970889390727e-7) {
          		tmp = t_1;
          	} else if (t_2 < 1.4754293444577233e-239) {
          		tmp = ((y * (a - z)) - (x * t)) / (a - t);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y)
          	t_2 = (x + y) - (((z - t) * y) / (a - t))
          	tmp = 0
          	if t_2 < -1.3664970889390727e-7:
          		tmp = t_1
          	elif t_2 < 1.4754293444577233e-239:
          		tmp = ((y * (a - z)) - (x * t)) / (a - t)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y))
          	t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t)))
          	tmp = 0.0
          	if (t_2 < -1.3664970889390727e-7)
          		tmp = t_1;
          	elseif (t_2 < 1.4754293444577233e-239)
          		tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
          	t_2 = (x + y) - (((z - t) * y) / (a - t));
          	tmp = 0.0;
          	if (t_2 < -1.3664970889390727e-7)
          		tmp = t_1;
          	elseif (t_2 < 1.4754293444577233e-239)
          		tmp = ((y * (a - z)) - (x * t)) / (a - t);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
          t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
          \mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
          \;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          

          Reproduce

          ?
          herbie shell --seed 2024205 
          (FPCore (x y z t a)
            :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
            :precision binary64
          
            :alt
            (! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
          
            (- (+ x y) (/ (* (- z t) y) (- a t))))