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

Percentage Accurate: 85.4% → 99.6%
Time: 14.6s
Alternatives: 19
Speedup: 1.0×

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 19 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.4% 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.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+286}\right):\\ \;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- z a))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+286)))
     (+ x (/ (- z t) (/ (- z a) y)))
     (+ x t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+286)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} else {
		tmp = x + t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+286)) {
		tmp = x + ((z - t) / ((z - a) / y));
	} else {
		tmp = x + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * (z - t)) / (z - a)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 2e+286):
		tmp = x + ((z - t) / ((z - a) / y))
	else:
		tmp = x + t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+286))
		tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y)));
	else
		tmp = Float64(x + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * (z - t)) / (z - a);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 2e+286)))
		tmp = x + ((z - t) / ((z - a) / y));
	else
		tmp = x + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+286]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+286}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 2.00000000000000007e286 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 41.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative41.8%

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{z - t}{\frac{z - a}{y}}} \]
    4. Add Preprocessing

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000007e286

    1. Initial program 98.9%

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

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

Alternative 2: 93.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;t_1 \leq 10^{+307}:\\ \;\;\;\;x + t_1\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- z a))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ y (/ z (- z t))))
     (if (<= t_1 1e+307) (+ x t_1) (+ x (* (- z t) (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x + (y / (z / (z - t)));
	} else if (t_1 <= 1e+307) {
		tmp = x + t_1;
	} else {
		tmp = x + ((z - t) * (y / z));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (z - a);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x + (y / (z / (z - t)));
	} else if (t_1 <= 1e+307) {
		tmp = x + t_1;
	} else {
		tmp = x + ((z - t) * (y / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * (z - t)) / (z - a)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + (y / (z / (z - t)))
	elif t_1 <= 1e+307:
		tmp = x + t_1
	else:
		tmp = x + ((z - t) * (y / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x + Float64(y / Float64(z / Float64(z - t))));
	elseif (t_1 <= 1e+307)
		tmp = Float64(x + t_1);
	else
		tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * (z - t)) / (z - a);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x + (y / (z / (z - t)));
	elseif (t_1 <= 1e+307)
		tmp = x + t_1;
	else
		tmp = x + ((z - t) * (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(x + t$95$1), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

\mathbf{elif}\;t_1 \leq 10^{+307}:\\
\;\;\;\;x + t_1\\

\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\


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

    1. Initial program 41.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative41.9%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified77.7%

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.99999999999999986e306

    1. Initial program 98.9%

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

    if 9.99999999999999986e306 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 39.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative39.8%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
      3. associate-/r/65.4%

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

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(z - t\right) + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.7%

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

Alternative 3: 74.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{t}{z}\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{+38}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-129}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-18} \lor \neg \left(z \leq 6.4 \cdot 10^{+44}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ t z)))))
   (if (<= z -3.2e+38)
     (+ y x)
     (if (<= z -9.8e-26)
       t_1
       (if (<= z 8e-129)
         (+ x (* y (/ t a)))
         (if (or (<= z 6.8e-18) (not (<= z 6.4e+44))) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (t / z));
	double tmp;
	if (z <= -3.2e+38) {
		tmp = y + x;
	} else if (z <= -9.8e-26) {
		tmp = t_1;
	} else if (z <= 8e-129) {
		tmp = x + (y * (t / a));
	} else if ((z <= 6.8e-18) || !(z <= 6.4e+44)) {
		tmp = y + x;
	} 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) :: tmp
    t_1 = x - (y * (t / z))
    if (z <= (-3.2d+38)) then
        tmp = y + x
    else if (z <= (-9.8d-26)) then
        tmp = t_1
    else if (z <= 8d-129) then
        tmp = x + (y * (t / a))
    else if ((z <= 6.8d-18) .or. (.not. (z <= 6.4d+44))) then
        tmp = y + x
    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 * (t / z));
	double tmp;
	if (z <= -3.2e+38) {
		tmp = y + x;
	} else if (z <= -9.8e-26) {
		tmp = t_1;
	} else if (z <= 8e-129) {
		tmp = x + (y * (t / a));
	} else if ((z <= 6.8e-18) || !(z <= 6.4e+44)) {
		tmp = y + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (t / z))
	tmp = 0
	if z <= -3.2e+38:
		tmp = y + x
	elif z <= -9.8e-26:
		tmp = t_1
	elif z <= 8e-129:
		tmp = x + (y * (t / a))
	elif (z <= 6.8e-18) or not (z <= 6.4e+44):
		tmp = y + x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(t / z)))
	tmp = 0.0
	if (z <= -3.2e+38)
		tmp = Float64(y + x);
	elseif (z <= -9.8e-26)
		tmp = t_1;
	elseif (z <= 8e-129)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif ((z <= 6.8e-18) || !(z <= 6.4e+44))
		tmp = Float64(y + x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * (t / z));
	tmp = 0.0;
	if (z <= -3.2e+38)
		tmp = y + x;
	elseif (z <= -9.8e-26)
		tmp = t_1;
	elseif (z <= 8e-129)
		tmp = x + (y * (t / a));
	elseif ((z <= 6.8e-18) || ~((z <= 6.4e+44)))
		tmp = y + x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+38], N[(y + x), $MachinePrecision], If[LessEqual[z, -9.8e-26], t$95$1, If[LessEqual[z, 8e-129], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6.8e-18], N[Not[LessEqual[z, 6.4e+44]], $MachinePrecision]], N[(y + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+38}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq -9.8 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-18} \lor \neg \left(z \leq 6.4 \cdot 10^{+44}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.19999999999999985e38 or 7.9999999999999994e-129 < z < 6.80000000000000002e-18 or 6.40000000000000009e44 < z

    1. Initial program 77.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative77.9%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative79.0%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified79.0%

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

    if -3.19999999999999985e38 < z < -9.7999999999999998e-26 or 6.80000000000000002e-18 < z < 6.40000000000000009e44

    1. Initial program 99.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified73.5%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 85.5%

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{z}{t}}} + x \]
    9. Step-by-step derivation
      1. associate-*r/85.5%

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot z}{t}}} + x \]
      2. neg-mul-185.5%

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    10. Simplified85.5%

      \[\leadsto \frac{y}{\color{blue}{\frac{-z}{t}}} + x \]
    11. Step-by-step derivation
      1. frac-2neg85.5%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{-z}{t}}} + x \]
      2. distribute-frac-neg85.5%

        \[\leadsto \color{blue}{\left(-\frac{y}{-\frac{-z}{t}}\right)} + x \]
      3. add-sqr-sqrt26.9%

        \[\leadsto \left(-\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{-z}{t}}\right) + x \]
      4. sqrt-unprod42.4%

        \[\leadsto \left(-\frac{\color{blue}{\sqrt{y \cdot y}}}{-\frac{-z}{t}}\right) + x \]
      5. sqr-neg42.4%

        \[\leadsto \left(-\frac{\sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{-z}{t}}\right) + x \]
      6. sqrt-unprod36.5%

        \[\leadsto \left(-\frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{-z}{t}}\right) + x \]
      7. add-sqr-sqrt45.1%

        \[\leadsto \left(-\frac{\color{blue}{-y}}{-\frac{-z}{t}}\right) + x \]
      8. frac-2neg45.1%

        \[\leadsto \left(-\color{blue}{\frac{y}{\frac{-z}{t}}}\right) + x \]
      9. div-inv45.1%

        \[\leadsto \left(-\color{blue}{y \cdot \frac{1}{\frac{-z}{t}}}\right) + x \]
      10. clear-num45.1%

        \[\leadsto \left(-y \cdot \color{blue}{\frac{t}{-z}}\right) + x \]
      11. add-sqr-sqrt22.1%

        \[\leadsto \left(-y \cdot \frac{t}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}\right) + x \]
      12. sqrt-unprod58.5%

        \[\leadsto \left(-y \cdot \frac{t}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}\right) + x \]
      13. sqr-neg58.5%

        \[\leadsto \left(-y \cdot \frac{t}{\sqrt{\color{blue}{z \cdot z}}}\right) + x \]
      14. sqrt-unprod36.4%

        \[\leadsto \left(-y \cdot \frac{t}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}\right) + x \]
      15. add-sqr-sqrt85.4%

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

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

    if -9.7999999999999998e-26 < z < 7.9999999999999994e-129

    1. Initial program 93.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.5%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def94.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+38}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-26}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-129}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-18} \lor \neg \left(z \leq 6.4 \cdot 10^{+44}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-36} \lor \neg \left(a \leq 1.95 \cdot 10^{+24}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ y a) (- t z)))))
   (if (<= a -3.5e+44)
     t_1
     (if (<= a 1.7e-110)
       (+ x (/ y (/ z (- z t))))
       (if (or (<= a 5.4e-36) (not (<= a 1.95e+24)))
         t_1
         (+ x (/ y (/ (- z a) z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y / a) * (t - z));
	double tmp;
	if (a <= -3.5e+44) {
		tmp = t_1;
	} else if (a <= 1.7e-110) {
		tmp = x + (y / (z / (z - t)));
	} else if ((a <= 5.4e-36) || !(a <= 1.95e+24)) {
		tmp = t_1;
	} else {
		tmp = x + (y / ((z - a) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y / a) * (t - z))
    if (a <= (-3.5d+44)) then
        tmp = t_1
    else if (a <= 1.7d-110) then
        tmp = x + (y / (z / (z - t)))
    else if ((a <= 5.4d-36) .or. (.not. (a <= 1.95d+24))) then
        tmp = t_1
    else
        tmp = x + (y / ((z - a) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y / a) * (t - z));
	double tmp;
	if (a <= -3.5e+44) {
		tmp = t_1;
	} else if (a <= 1.7e-110) {
		tmp = x + (y / (z / (z - t)));
	} else if ((a <= 5.4e-36) || !(a <= 1.95e+24)) {
		tmp = t_1;
	} else {
		tmp = x + (y / ((z - a) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y / a) * (t - z))
	tmp = 0
	if a <= -3.5e+44:
		tmp = t_1
	elif a <= 1.7e-110:
		tmp = x + (y / (z / (z - t)))
	elif (a <= 5.4e-36) or not (a <= 1.95e+24):
		tmp = t_1
	else:
		tmp = x + (y / ((z - a) / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y / a) * Float64(t - z)))
	tmp = 0.0
	if (a <= -3.5e+44)
		tmp = t_1;
	elseif (a <= 1.7e-110)
		tmp = Float64(x + Float64(y / Float64(z / Float64(z - t))));
	elseif ((a <= 5.4e-36) || !(a <= 1.95e+24))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y / a) * (t - z));
	tmp = 0.0;
	if (a <= -3.5e+44)
		tmp = t_1;
	elseif (a <= 1.7e-110)
		tmp = x + (y / (z / (z - t)));
	elseif ((a <= 5.4e-36) || ~((a <= 1.95e+24)))
		tmp = t_1;
	else
		tmp = x + (y / ((z - a) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+44], t$95$1, If[LessEqual[a, 1.7e-110], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5.4e-36], N[Not[LessEqual[a, 1.95e+24]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-36} \lor \neg \left(a \leq 1.95 \cdot 10^{+24}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4999999999999999e44 or 1.7000000000000001e-110 < a < 5.40000000000000015e-36 or 1.9499999999999999e24 < a

    1. Initial program 86.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative86.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot \left(z - t\right)}{a}\right)} \]
      2. unsub-neg80.8%

        \[\leadsto \color{blue}{x - \frac{y \cdot \left(z - t\right)}{a}} \]
      3. associate-/l*91.4%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      4. associate-/r/91.5%

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

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

    if -3.4999999999999999e44 < a < 1.7000000000000001e-110

    1. Initial program 86.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative86.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified85.7%

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

    if 5.40000000000000015e-36 < a < 1.9499999999999999e24

    1. Initial program 80.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.2%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def99.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    6. Step-by-step derivation
      1. +-commutative65.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z}}} + x \]
    7. Simplified84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-36} \lor \neg \left(a \leq 1.95 \cdot 10^{+24}\right):\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75e37 or 1.05000000000000005e-127 < z

    1. Initial program 79.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
      2. associate-/r/83.9%

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

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

    if -1.75e37 < z < -1.20000000000000005e-25

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 98.1%

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{z}{t}}} + x \]
    9. Step-by-step derivation
      1. associate-*r/98.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot z}{t}}} + x \]
      2. neg-mul-198.1%

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    10. Simplified98.1%

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

    if -1.20000000000000005e-25 < z < 1.05000000000000005e-127

    1. Initial program 93.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.5%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def94.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+37}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-127}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+38}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\

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

\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.69999999999999998e38

    1. Initial program 88.0%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
      2. associate-/r/89.5%

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

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

    if -1.69999999999999998e38 < z < -3.89999999999999986e-26

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 98.1%

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{z}{t}}} + x \]
    9. Step-by-step derivation
      1. associate-*r/98.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot z}{t}}} + x \]
      2. neg-mul-198.1%

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    10. Simplified98.1%

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

    if -3.89999999999999986e-26 < z < 2.9000000000000002e-85

    1. Initial program 93.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/82.5%

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

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

    if 2.9000000000000002e-85 < z

    1. Initial program 73.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative73.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
      3. associate-/r/81.9%

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

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(z - t\right) + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.5%

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

Alternative 7: 79.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.50000000000000011e37 or 5.50000000000000014e-196 < z

    1. Initial program 80.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.1%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def95.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z}}} + x \]
    7. Simplified85.1%

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

    if -1.50000000000000011e37 < z < -2.8000000000000001e-26

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 98.1%

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{z}{t}}} + x \]
    9. Step-by-step derivation
      1. associate-*r/98.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot z}{t}}} + x \]
      2. neg-mul-198.1%

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    10. Simplified98.1%

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

    if -2.8000000000000001e-26 < z < 5.50000000000000014e-196

    1. Initial program 93.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/87.0%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    7. Simplified87.0%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
      2. clear-num87.0%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} + x \]
      3. un-div-inv87.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    9. Applied egg-rr87.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-196}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-24}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2999999999999999e42 or 1.05000000000000005e-127 < z

    1. Initial program 79.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative79.6%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative75.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified75.3%

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

    if -3.2999999999999999e42 < z < -2.20000000000000002e-24

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 97.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} + x \]
    9. Step-by-step derivation
      1. mul-1-neg97.9%

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

        \[\leadsto \left(-\color{blue}{t \cdot \frac{y}{z}}\right) + x \]
      3. distribute-rgt-neg-in97.9%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} + x \]
    10. Simplified97.9%

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

    if -2.20000000000000002e-24 < z < 1.05000000000000005e-127

    1. Initial program 93.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.5%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def94.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+42}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-24}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-127}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.00000000000000011e45 or 1e-127 < z

    1. Initial program 79.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative79.6%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative75.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified75.3%

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

    if -3.00000000000000011e45 < z < -2.0499999999999999e-26

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 98.1%

      \[\leadsto \frac{y}{\color{blue}{-1 \cdot \frac{z}{t}}} + x \]
    9. Step-by-step derivation
      1. associate-*r/98.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot z}{t}}} + x \]
      2. neg-mul-198.1%

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    10. Simplified98.1%

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

    if -2.0499999999999999e-26 < z < 1e-127

    1. Initial program 93.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.5%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def94.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/83.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+45}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq 10^{-127}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 81.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-26} \lor \neg \left(z \leq 5.6 \cdot 10^{-85}\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{t}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.70000000000000007e-26 or 5.60000000000000033e-85 < z

    1. Initial program 80.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified84.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    8. Taylor expanded in z around 0 81.8%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{t \cdot y}{z}\right)} + x \]
    9. Step-by-step derivation
      1. mul-1-neg81.8%

        \[\leadsto \left(y + \color{blue}{\left(-\frac{t \cdot y}{z}\right)}\right) + x \]
      2. unsub-neg81.8%

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

        \[\leadsto \left(y - \color{blue}{\frac{t}{\frac{z}{y}}}\right) + x \]
      4. associate-/r/84.9%

        \[\leadsto \left(y - \color{blue}{\frac{t}{z} \cdot y}\right) + x \]
    10. Simplified84.9%

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

    if -1.70000000000000007e-26 < z < 5.60000000000000033e-85

    1. Initial program 93.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/82.5%

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

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

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

Alternative 11: 81.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-26} \lor \neg \left(z \leq 8.2 \cdot 10^{-86}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-26 or 8.19999999999999959e-86 < z

    1. Initial program 80.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    7. Simplified84.9%

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

    if -2.8000000000000001e-26 < z < 8.19999999999999959e-86

    1. Initial program 93.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/82.5%

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

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

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

Alternative 12: 87.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-67} \lor \neg \left(t \leq 4.6 \cdot 10^{+86}\right):\\
\;\;\;\;x - \frac{y}{\frac{z - a}{t}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.99999999999999989e-67 or 4.59999999999999979e86 < t

    1. Initial program 84.7%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/90.8%

        \[\leadsto x + -1 \cdot \color{blue}{\left(t \cdot \frac{y}{z - a}\right)} \]
      2. neg-mul-190.8%

        \[\leadsto x + \color{blue}{\left(-t \cdot \frac{y}{z - a}\right)} \]
      3. distribute-lft-neg-in90.8%

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

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

      \[\leadsto x + \color{blue}{\frac{y}{z - a} \cdot \left(-t\right)} \]
    6. Step-by-step derivation
      1. distribute-rgt-neg-out90.8%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{z - a} \cdot t\right)} \]
      2. add-sqr-sqrt38.8%

        \[\leadsto x + \left(-\frac{y}{z - a} \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)}\right) \]
      3. sqrt-unprod37.8%

        \[\leadsto x + \left(-\frac{y}{z - a} \cdot \color{blue}{\sqrt{t \cdot t}}\right) \]
      4. sqr-neg37.8%

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

        \[\leadsto x + \left(-\frac{y}{z - a} \cdot \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)}\right) \]
      6. add-sqr-sqrt39.6%

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

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

        \[\leadsto x + \left(-\color{blue}{\frac{y}{\frac{z - a}{-t}}}\right) \]
      9. add-sqr-sqrt24.1%

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

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

        \[\leadsto x + \left(-\frac{y}{\frac{z - a}{\sqrt{\color{blue}{t \cdot t}}}}\right) \]
      12. sqrt-unprod37.9%

        \[\leadsto x + \left(-\frac{y}{\frac{z - a}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}}\right) \]
      13. add-sqr-sqrt89.1%

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

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

    if -1.99999999999999989e-67 < t < 4.59999999999999979e86

    1. Initial program 87.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative87.0%

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    6. Step-by-step derivation
      1. +-commutative79.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z}}} + x \]
    7. Simplified90.8%

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

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

Alternative 13: 87.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-68} \lor \neg \left(t \leq 6.2 \cdot 10^{+86}\right):\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.49999999999999986e-68 or 6.2000000000000004e86 < t

    1. Initial program 84.7%

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    4. Step-by-step derivation
      1. associate-*r/90.8%

        \[\leadsto x + -1 \cdot \color{blue}{\left(t \cdot \frac{y}{z - a}\right)} \]
      2. neg-mul-190.8%

        \[\leadsto x + \color{blue}{\left(-t \cdot \frac{y}{z - a}\right)} \]
      3. distribute-lft-neg-in90.8%

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

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

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

    if -2.49999999999999986e-68 < t < 6.2000000000000004e86

    1. Initial program 87.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative87.0%

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    6. Step-by-step derivation
      1. +-commutative79.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z}}} + x \]
    7. Simplified90.8%

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

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

Alternative 14: 62.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+23} \lor \neg \left(z \leq 1.8 \cdot 10^{-223}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.0000000000000004e23 or 1.8000000000000002e-223 < z

    1. Initial program 79.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative79.7%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative71.4%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified71.4%

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

    if -7.0000000000000004e23 < z < 1.8000000000000002e-223

    1. Initial program 96.1%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{z - a}} \]
    4. Taylor expanded in z around 0 54.0%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.0%

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

        \[\leadsto x + \left(-\color{blue}{\frac{y}{\frac{a}{z}}}\right) \]
      3. distribute-neg-frac54.0%

        \[\leadsto x + \color{blue}{\frac{-y}{\frac{a}{z}}} \]
    6. Simplified54.0%

      \[\leadsto x + \color{blue}{\frac{-y}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/54.4%

        \[\leadsto x + \color{blue}{\frac{-y}{a} \cdot z} \]
      2. add-sqr-sqrt22.9%

        \[\leadsto x + \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{a} \cdot z \]
      3. sqrt-unprod50.2%

        \[\leadsto x + \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{a} \cdot z \]
      4. sqr-neg50.2%

        \[\leadsto x + \frac{\sqrt{\color{blue}{y \cdot y}}}{a} \cdot z \]
      5. sqrt-unprod30.6%

        \[\leadsto x + \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{a} \cdot z \]
      6. add-sqr-sqrt53.6%

        \[\leadsto x + \frac{\color{blue}{y}}{a} \cdot z \]
    8. Applied egg-rr53.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+23} \lor \neg \left(z \leq 1.8 \cdot 10^{-223}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 74.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+24} \lor \neg \left(z \leq 7.8 \cdot 10^{-128}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.9999999999999998e23 or 7.79999999999999993e-128 < z

    1. Initial program 80.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.0%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative74.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified74.3%

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

    if -9.9999999999999998e23 < z < 7.79999999999999993e-128

    1. Initial program 93.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.9%

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
      3. fma-def94.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/80.4%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
    7. Simplified80.4%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot y + x} \]
    8. Taylor expanded in t around 0 76.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} + x \]
      3. *-commutative79.0%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    10. Simplified79.0%

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

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

Alternative 16: 73.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.052 \lor \neg \left(z \leq 1.05 \cdot 10^{-127}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.0519999999999999976 or 1.05000000000000005e-127 < z

    1. Initial program 80.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative80.5%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified73.7%

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

    if -0.0519999999999999976 < z < 1.05000000000000005e-127

    1. Initial program 93.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative93.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
      3. associate-/r/81.5%

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

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

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

Alternative 17: 62.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+45}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+32}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.79999999999999979e45 or 3.09999999999999993e32 < a

    1. Initial program 85.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative85.8%

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

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

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

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

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

    if -4.79999999999999979e45 < a < 3.09999999999999993e32

    1. Initial program 86.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative86.1%

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative62.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+32}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 98.2% accurate, 1.0× speedup?

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

\\
y \cdot \frac{z - t}{z - a} + x
\end{array}
Derivation
  1. Initial program 86.0%

    \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative86.0%

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

      \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
    3. fma-def95.6%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z - a}, z - t, x\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. fma-udef95.6%

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z - t}}} + x \]
    3. div-inv99.1%

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

      \[\leadsto y \cdot \color{blue}{\frac{z - t}{z - a}} + x \]
  6. Applied egg-rr99.1%

    \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a} + x} \]
  7. Final simplification99.1%

    \[\leadsto y \cdot \frac{z - t}{z - a} + x \]
  8. Add Preprocessing

Alternative 19: 51.3% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 86.0%

    \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative86.0%

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

      \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} + x \]
    3. fma-def95.6%

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification50.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.4% accurate, 1.0× 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 2024020 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

  (+ x (/ (* y (- z t)) (- z a))))