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

Percentage Accurate: 85.6% → 98.1%
Time: 7.9s
Alternatives: 9
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 85.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1000000000000001e82

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1000000000000001e82 < a < 7.20000000000000025e-106

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

    if 7.20000000000000025e-106 < a

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-104}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\

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

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


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

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

    if -1.02000000000000001e-104 < a < 7.20000000000000025e-106

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

    if 7.20000000000000025e-106 < a

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1500000000000001e-40 or 1.3000000000000001e-29 < z

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

    if -2.1500000000000001e-40 < z < 1.3000000000000001e-29

    1. Initial program 97.1%

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

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

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

        \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    5. Applied rewrites77.5%

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

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

Alternative 5: 75.4% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.09999999999999963e-40 or 6.6000000000000006e132 < z

    1. Initial program 76.5%

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

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

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

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

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

    if -4.09999999999999963e-40 < z < 6.6000000000000006e132

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.7% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.09999999999999963e-40 or 6.6000000000000006e132 < z

    1. Initial program 76.5%

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

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

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

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

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

    if -4.09999999999999963e-40 < z < 6.6000000000000006e132

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

Alternative 7: 59.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+140}:\\
\;\;\;\;\frac{t}{a} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.39999999999999991e140

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.39999999999999991e140 < y

        1. Initial program 88.0%

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

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

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

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

          \[\leadsto \color{blue}{y + x} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification66.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+140}:\\ \;\;\;\;\frac{t}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 60.8% accurate, 1.1× speedup?

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

        1. Initial program 85.3%

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

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

            \[\leadsto \color{blue}{y + x} \]
          2. lower-+.f6465.6

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

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

        if 9.00000000000000059e272 < t

        1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9 \cdot 10^{+272}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 60.7% accurate, 6.5× speedup?

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

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

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

              \[\leadsto \color{blue}{y + x} \]
            2. lower-+.f6463.9

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

            \[\leadsto \color{blue}{y + x} \]
          6. Final simplification63.9%

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

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

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

          Reproduce

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