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

Percentage Accurate: 85.7% → 99.1%
Time: 9.2s
Alternatives: 12
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 85.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.1% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -9.9999999999999992e227 or 1.79999999999999993e282 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 46.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1 \cdot \color{blue}{\frac{y}{z - a}}}{\frac{z + t}{z \cdot z - t \cdot t}} \]
      12. clear-numN/A

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

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

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

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

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

    if -9.9999999999999992e227 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.79999999999999993e282

    1. Initial program 99.4%

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

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

Alternative 2: 96.0% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{a - z}}{\frac{-1}{z - t}}\\


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999992e227 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.79999999999999993e282

    1. Initial program 99.4%

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

    if 1.79999999999999993e282 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{-y}{z - a}}{\color{blue}{\frac{-1}{z - t}}} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification97.0%

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

    Alternative 3: 96.1% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\ t_2 := \left(t - z\right) \cdot y\\ t_3 := \frac{t\_2}{a - z}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+228}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq 10^{+293}:\\ \;\;\;\;x - \frac{t\_2}{z - a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (/ y (- z a)) (- z t)))
            (t_2 (* (- t z) y))
            (t_3 (/ t_2 (- a z))))
       (if (<= t_3 -1e+228) t_1 (if (<= t_3 1e+293) (- x (/ t_2 (- z a))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (z - t);
    	double t_2 = (t - z) * y;
    	double t_3 = t_2 / (a - z);
    	double tmp;
    	if (t_3 <= -1e+228) {
    		tmp = t_1;
    	} else if (t_3 <= 1e+293) {
    		tmp = x - (t_2 / (z - a));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: tmp
        t_1 = (y / (z - a)) * (z - t)
        t_2 = (t - z) * y
        t_3 = t_2 / (a - z)
        if (t_3 <= (-1d+228)) then
            tmp = t_1
        else if (t_3 <= 1d+293) then
            tmp = x - (t_2 / (z - a))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (z - t);
    	double t_2 = (t - z) * y;
    	double t_3 = t_2 / (a - z);
    	double tmp;
    	if (t_3 <= -1e+228) {
    		tmp = t_1;
    	} else if (t_3 <= 1e+293) {
    		tmp = x - (t_2 / (z - a));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (y / (z - a)) * (z - t)
    	t_2 = (t - z) * y
    	t_3 = t_2 / (a - z)
    	tmp = 0
    	if t_3 <= -1e+228:
    		tmp = t_1
    	elif t_3 <= 1e+293:
    		tmp = x - (t_2 / (z - a))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(z - t))
    	t_2 = Float64(Float64(t - z) * y)
    	t_3 = Float64(t_2 / Float64(a - z))
    	tmp = 0.0
    	if (t_3 <= -1e+228)
    		tmp = t_1;
    	elseif (t_3 <= 1e+293)
    		tmp = Float64(x - Float64(t_2 / Float64(z - a)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (y / (z - a)) * (z - t);
    	t_2 = (t - z) * y;
    	t_3 = t_2 / (a - z);
    	tmp = 0.0;
    	if (t_3 <= -1e+228)
    		tmp = t_1;
    	elseif (t_3 <= 1e+293)
    		tmp = x - (t_2 / (z - a));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+228], t$95$1, If[LessEqual[t$95$3, 1e+293], N[(x - N[(t$95$2 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\
    t_2 := \left(t - z\right) \cdot y\\
    t_3 := \frac{t\_2}{a - z}\\
    \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+228}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_3 \leq 10^{+293}:\\
    \;\;\;\;x - \frac{t\_2}{z - a}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -9.9999999999999992e227 or 9.9999999999999992e292 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

      1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -9.9999999999999992e227 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.9999999999999992e292

      1. Initial program 99.4%

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

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

    Alternative 4: 83.6% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\ t_2 := \frac{\left(t - z\right) \cdot y}{a - z}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+121}:\\ \;\;\;\;x - \frac{z \cdot y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (/ y (- z a)) (- z t))) (t_2 (/ (* (- t z) y) (- a z))))
       (if (<= t_2 -2e+111)
         t_1
         (if (<= t_2 5e+121) (- x (/ (* z y) (- a z))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (z - t);
    	double t_2 = ((t - z) * y) / (a - z);
    	double tmp;
    	if (t_2 <= -2e+111) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+121) {
    		tmp = x - ((z * y) / (a - z));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (y / (z - a)) * (z - t)
        t_2 = ((t - z) * y) / (a - z)
        if (t_2 <= (-2d+111)) then
            tmp = t_1
        else if (t_2 <= 5d+121) then
            tmp = x - ((z * y) / (a - z))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (z - t);
    	double t_2 = ((t - z) * y) / (a - z);
    	double tmp;
    	if (t_2 <= -2e+111) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+121) {
    		tmp = x - ((z * y) / (a - z));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (y / (z - a)) * (z - t)
    	t_2 = ((t - z) * y) / (a - z)
    	tmp = 0
    	if t_2 <= -2e+111:
    		tmp = t_1
    	elif t_2 <= 5e+121:
    		tmp = x - ((z * y) / (a - z))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(z - t))
    	t_2 = Float64(Float64(Float64(t - z) * y) / Float64(a - z))
    	tmp = 0.0
    	if (t_2 <= -2e+111)
    		tmp = t_1;
    	elseif (t_2 <= 5e+121)
    		tmp = Float64(x - Float64(Float64(z * y) / Float64(a - z)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (y / (z - a)) * (z - t);
    	t_2 = ((t - z) * y) / (a - z);
    	tmp = 0.0;
    	if (t_2 <= -2e+111)
    		tmp = t_1;
    	elseif (t_2 <= 5e+121)
    		tmp = x - ((z * y) / (a - z));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+111], t$95$1, If[LessEqual[t$95$2, 5e+121], N[(x - N[(N[(z * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\
    t_2 := \frac{\left(t - z\right) \cdot y}{a - z}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+111}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+121}:\\
    \;\;\;\;x - \frac{z \cdot y}{a - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1.99999999999999991e111 or 5.00000000000000007e121 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.99999999999999991e111 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.00000000000000007e121

      1. Initial program 99.3%

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

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

          \[\leadsto x + \frac{\color{blue}{z \cdot y}}{z - a} \]
        2. lower-*.f6489.9

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

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

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

    Alternative 5: 83.6% accurate, 0.3× speedup?

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

      1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.99999999999999991e111 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.00000000000000007e121

      1. Initial program 99.3%

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

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

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

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

    Alternative 6: 78.6% accurate, 0.7× speedup?

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

      1. Initial program 74.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.2

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

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

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

        if -1.25e26 < z < -1.28e-79

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
        7. Step-by-step derivation
          1. Applied rewrites83.9%

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

          if -1.28e-79 < z < 1.2999999999999999e-66

          1. Initial program 96.9%

            \[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-*.f6488.2

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

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

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

        Alternative 7: 76.2% accurate, 0.7× speedup?

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

          1. Initial program 73.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-+.f6474.4

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

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

          if -1.24999999999999995e27 < z < -1.28e-79

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
          7. Step-by-step derivation
            1. Applied rewrites83.9%

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

            if -1.28e-79 < z < 2.2499999999999999e-26

            1. Initial program 96.4%

              \[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-*.f6484.1

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+27}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -1.28 \cdot 10^{-79}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\ \;\;\;\;\frac{t}{a} \cdot y + x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
            9. Add Preprocessing

            Alternative 8: 76.3% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+27}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-77}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\ \;\;\;\;\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 -1.25e+27)
               (+ x y)
               (if (<= z -4.8e-77)
                 (fma (/ (- t) z) y x)
                 (if (<= z 2.25e-26) (fma (/ y a) t x) (+ x y)))))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (z <= -1.25e+27) {
            		tmp = x + y;
            	} else if (z <= -4.8e-77) {
            		tmp = fma((-t / z), y, x);
            	} else if (z <= 2.25e-26) {
            		tmp = fma((y / a), t, x);
            	} else {
            		tmp = x + y;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if (z <= -1.25e+27)
            		tmp = Float64(x + y);
            	elseif (z <= -4.8e-77)
            		tmp = fma(Float64(Float64(-t) / z), y, x);
            	elseif (z <= 2.25e-26)
            		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, -1.25e+27], N[(x + y), $MachinePrecision], If[LessEqual[z, -4.8e-77], N[(N[((-t) / z), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[z, 2.25e-26], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.25 \cdot 10^{+27}:\\
            \;\;\;\;x + y\\
            
            \mathbf{elif}\;z \leq -4.8 \cdot 10^{-77}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\
            
            \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x + y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.24999999999999995e27 or 2.2499999999999999e-26 < z

              1. Initial program 73.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-+.f6474.4

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

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

              if -1.24999999999999995e27 < z < -4.7999999999999998e-77

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
              7. Step-by-step derivation
                1. Applied rewrites83.9%

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

                if -4.7999999999999998e-77 < z < 2.2499999999999999e-26

                1. Initial program 96.4%

                  \[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-/.f6484.2

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

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

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

              Alternative 9: 79.4% accurate, 0.8× speedup?

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

                1. Initial program 78.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--.f6488.1

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

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

                if -2.8e16 < a < 4.1999999999999998e-32

                1. Initial program 88.6%

                  \[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--.f6485.8

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

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

                if 4.1999999999999998e-32 < a

                1. Initial program 83.5%

                  \[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}} \]
                6. Step-by-step derivation
                  1. Applied rewrites84.5%

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

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

                Alternative 10: 80.8% 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 -9.5 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-64}:\\ \;\;\;\;\frac{t \cdot y}{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 -9.5e-82) t_1 (if (<= z 7.6e-64) (+ (/ (* t y) 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 <= -9.5e-82) {
                		tmp = t_1;
                	} else if (z <= 7.6e-64) {
                		tmp = ((t * y) / 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 <= -9.5e-82)
                		tmp = t_1;
                	elseif (z <= 7.6e-64)
                		tmp = Float64(Float64(Float64(t * y) / 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, -9.5e-82], t$95$1, If[LessEqual[z, 7.6e-64], N[(N[(N[(t * y), $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 -9.5 \cdot 10^{-82}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 7.6 \cdot 10^{-64}:\\
                \;\;\;\;\frac{t \cdot y}{a} + x\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -9.4999999999999996e-82 or 7.6000000000000003e-64 < z

                  1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

                  if -9.4999999999999996e-82 < z < 7.6000000000000003e-64

                  1. Initial program 96.9%

                    \[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-*.f6488.2

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

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

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

                Alternative 11: 76.5% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-5}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\ \;\;\;\;\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 -2.1e-5) (+ x y) (if (<= z 2.25e-26) (fma (/ y a) t x) (+ x y))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (z <= -2.1e-5) {
                		tmp = x + y;
                	} else if (z <= 2.25e-26) {
                		tmp = fma((y / a), t, x);
                	} else {
                		tmp = x + y;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (z <= -2.1e-5)
                		tmp = Float64(x + y);
                	elseif (z <= 2.25e-26)
                		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, -2.1e-5], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.25e-26], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -2.1 \cdot 10^{-5}:\\
                \;\;\;\;x + y\\
                
                \mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\
                \;\;\;\;\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 < -2.09999999999999988e-5 or 2.2499999999999999e-26 < z

                  1. Initial program 74.9%

                    \[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-+.f6473.0

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

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

                  if -2.09999999999999988e-5 < z < 2.2499999999999999e-26

                  1. Initial program 96.7%

                    \[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-/.f6483.0

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

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

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

                Alternative 12: 59.6% accurate, 6.5× speedup?

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

                  \[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-+.f6461.2

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

                  \[\leadsto \color{blue}{y + x} \]
                6. Final simplification61.2%

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

                Developer Target 1: 98.3% 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 2024243 
                (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))))