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

Percentage Accurate: 85.3% → 98.2%
Time: 11.5s
Alternatives: 15
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 15 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{z - a} \cdot y} \]
  3. Applied egg-rr98.2%

    \[\leadsto x + \color{blue}{\frac{z - t}{z - a} \cdot y} \]
  4. Final simplification98.2%

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

Alternative 2: 80.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{-y}{z - a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-62}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-95}:\\ \;\;\;\;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 (- z a))))))
   (if (<= z -3.4e+84)
     t_1
     (if (<= z -5.2e+33)
       (- x (/ t (/ z y)))
       (if (<= z -3.45e-37)
         t_1
         (if (<= z -8.6e-42)
           (* t (/ (- y) (- z a)))
           (if (<= z -1.46e-62)
             (+ x (/ y (/ (- z) t)))
             (if (<= z 1.65e-95) (+ x (/ y (/ a t))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / (z - a)));
	double tmp;
	if (z <= -3.4e+84) {
		tmp = t_1;
	} else if (z <= -5.2e+33) {
		tmp = x - (t / (z / y));
	} else if (z <= -3.45e-37) {
		tmp = t_1;
	} else if (z <= -8.6e-42) {
		tmp = t * (-y / (z - a));
	} else if (z <= -1.46e-62) {
		tmp = x + (y / (-z / t));
	} else if (z <= 1.65e-95) {
		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 / (z - a)))
    if (z <= (-3.4d+84)) then
        tmp = t_1
    else if (z <= (-5.2d+33)) then
        tmp = x - (t / (z / y))
    else if (z <= (-3.45d-37)) then
        tmp = t_1
    else if (z <= (-8.6d-42)) then
        tmp = t * (-y / (z - a))
    else if (z <= (-1.46d-62)) then
        tmp = x + (y / (-z / t))
    else if (z <= 1.65d-95) 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 / (z - a)));
	double tmp;
	if (z <= -3.4e+84) {
		tmp = t_1;
	} else if (z <= -5.2e+33) {
		tmp = x - (t / (z / y));
	} else if (z <= -3.45e-37) {
		tmp = t_1;
	} else if (z <= -8.6e-42) {
		tmp = t * (-y / (z - a));
	} else if (z <= -1.46e-62) {
		tmp = x + (y / (-z / t));
	} else if (z <= 1.65e-95) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / (z - a)))
	tmp = 0
	if z <= -3.4e+84:
		tmp = t_1
	elif z <= -5.2e+33:
		tmp = x - (t / (z / y))
	elif z <= -3.45e-37:
		tmp = t_1
	elif z <= -8.6e-42:
		tmp = t * (-y / (z - a))
	elif z <= -1.46e-62:
		tmp = x + (y / (-z / t))
	elif z <= 1.65e-95:
		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(z / Float64(z - a))))
	tmp = 0.0
	if (z <= -3.4e+84)
		tmp = t_1;
	elseif (z <= -5.2e+33)
		tmp = Float64(x - Float64(t / Float64(z / y)));
	elseif (z <= -3.45e-37)
		tmp = t_1;
	elseif (z <= -8.6e-42)
		tmp = Float64(t * Float64(Float64(-y) / Float64(z - a)));
	elseif (z <= -1.46e-62)
		tmp = Float64(x + Float64(y / Float64(Float64(-z) / t)));
	elseif (z <= 1.65e-95)
		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 / (z - a)));
	tmp = 0.0;
	if (z <= -3.4e+84)
		tmp = t_1;
	elseif (z <= -5.2e+33)
		tmp = x - (t / (z / y));
	elseif (z <= -3.45e-37)
		tmp = t_1;
	elseif (z <= -8.6e-42)
		tmp = t * (-y / (z - a));
	elseif (z <= -1.46e-62)
		tmp = x + (y / (-z / t));
	elseif (z <= 1.65e-95)
		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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+84], t$95$1, If[LessEqual[z, -5.2e+33], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.45e-37], t$95$1, If[LessEqual[z, -8.6e-42], N[(t * N[((-y) / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-62], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-95], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.45 \cdot 10^{-37}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.3999999999999998e84 or -5.1999999999999995e33 < z < -3.4499999999999999e-37 or 1.65e-95 < 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 x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a} \]
      2. associate-*l/99.6%

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

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

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

    if -3.3999999999999998e84 < z < -5.1999999999999995e33

    1. Initial program 99.9%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{-y}{z - a}} \]
    5. Taylor expanded in z around inf 93.3%

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*93.3%

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

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

    if -3.4499999999999999e-37 < z < -8.6000000000000002e-42

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z - a}{y}}} \]
    7. Simplified100.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    9. Step-by-step derivation
      1. mul-1-neg99.5%

        \[\leadsto \color{blue}{-\frac{t \cdot y}{z - a}} \]
      2. associate-*r/100.0%

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z - a}} \]
      3. *-commutative100.0%

        \[\leadsto -\color{blue}{\frac{y}{z - a} \cdot t} \]
      4. distribute-rgt-neg-in100.0%

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

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

    if -8.6000000000000002e-42 < z < -1.46e-62

    1. Initial program 99.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified75.2%

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

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

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

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

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

    if -1.46e-62 < z < 1.65e-95

    1. Initial program 96.7%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Applied egg-rr81.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-37}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{-y}{z - a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-62}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-95}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 3: 81.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{\left(z - t\right) \cdot y}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-98}:\\ \;\;\;\;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 (- z a))))))
   (if (<= z -1.7e+104)
     t_1
     (if (<= z -7.8e-64)
       (+ x (/ (* (- z t) y) z))
       (if (<= z 5.8e-98) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / (z - a)));
	double tmp;
	if (z <= -1.7e+104) {
		tmp = t_1;
	} else if (z <= -7.8e-64) {
		tmp = x + (((z - t) * y) / z);
	} else if (z <= 5.8e-98) {
		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 / (z - a)))
    if (z <= (-1.7d+104)) then
        tmp = t_1
    else if (z <= (-7.8d-64)) then
        tmp = x + (((z - t) * y) / z)
    else if (z <= 5.8d-98) 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 / (z - a)));
	double tmp;
	if (z <= -1.7e+104) {
		tmp = t_1;
	} else if (z <= -7.8e-64) {
		tmp = x + (((z - t) * y) / z);
	} else if (z <= 5.8e-98) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / (z - a)))
	tmp = 0
	if z <= -1.7e+104:
		tmp = t_1
	elif z <= -7.8e-64:
		tmp = x + (((z - t) * y) / z)
	elif z <= 5.8e-98:
		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(z / Float64(z - a))))
	tmp = 0.0
	if (z <= -1.7e+104)
		tmp = t_1;
	elseif (z <= -7.8e-64)
		tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / z));
	elseif (z <= 5.8e-98)
		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 / (z - a)));
	tmp = 0.0;
	if (z <= -1.7e+104)
		tmp = t_1;
	elseif (z <= -7.8e-64)
		tmp = x + (((z - t) * y) / z);
	elseif (z <= 5.8e-98)
		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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+104], t$95$1, If[LessEqual[z, -7.8e-64], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-98], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-98}:\\
\;\;\;\;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.6999999999999998e104 or 5.8e-98 < z

    1. Initial program 77.4%

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

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

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

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

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

    if -1.6999999999999998e104 < z < -7.7999999999999994e-64

    1. Initial program 99.7%

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

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

    if -7.7999999999999994e-64 < z < 5.8e-98

    1. Initial program 96.7%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Applied egg-rr81.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+104}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{\left(z - t\right) \cdot y}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 4: 75.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.80000000000000003e81 or 4.8000000000000003e-52 < z

    1. Initial program 77.6%

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

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

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

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

    if -1.80000000000000003e81 < z < -2.3999999999999999e42

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    5. Taylor expanded in y around inf 88.7%

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

    if -2.3999999999999999e42 < z < 4.8000000000000003e-52

    1. Initial program 97.4%

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{y}{z - a}\right)} \]
      4. distribute-neg-frac88.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+42}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-52}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 75.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{+40}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.80000000000000003e81 or 3.80000000000000002e-48 < z

    1. Initial program 77.6%

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

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

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

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

    if -1.80000000000000003e81 < z < -2.00000000000000006e40

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    5. Taylor expanded in y around inf 88.7%

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

    if -2.00000000000000006e40 < z < 3.80000000000000002e-48

    1. Initial program 97.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+40}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-48}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 75.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{+41}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.80000000000000003e81 or 1.5e-52 < z

    1. Initial program 77.6%

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

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

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

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

    if -1.80000000000000003e81 < z < -7.20000000000000051e41

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    5. Taylor expanded in y around inf 88.7%

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

    if -7.20000000000000051e41 < z < 1.5e-52

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+41}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 76.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.5e85 or 3.19999999999999998e-54 < z

    1. Initial program 77.4%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified80.6%

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

    if -2.5e85 < z < -8.7999999999999995e-60

    1. Initial program 99.7%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{-y}{z - a}} \]
    5. Taylor expanded in z around inf 76.6%

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*76.8%

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

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

    if -8.7999999999999995e-60 < z < 3.19999999999999998e-54

    1. Initial program 96.9%

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{z - a} \cdot y} \]
    3. Applied egg-rr95.4%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Applied egg-rr80.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+85}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-60}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-54}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 82.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.9500000000000002e-62

    1. Initial program 87.5%

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

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

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

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

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

    if -2.9500000000000002e-62 < z < 4.39999999999999991e-93

    1. Initial program 96.7%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Applied egg-rr81.0%

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

    if 4.39999999999999991e-93 < z

    1. Initial program 78.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.95 \cdot 10^{-62}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-93}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 9: 80.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 88.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot z} + x \]
      3. *-commutative83.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{z - a}} + x \]
    4. Simplified83.5%

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

    if -1.9000000000000001e-5 < a < 9.5000000000000003e33

    1. Initial program 88.6%

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

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

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

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

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

    if 9.5000000000000003e33 < a

    1. Initial program 84.1%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    4. Simplified86.7%

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
    6. Applied egg-rr93.2%

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

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

Alternative 10: 87.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{-36}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.16000000000000002e-36

    1. Initial program 86.2%

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

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

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

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

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

    if -1.16000000000000002e-36 < z < 2.1499999999999999e92

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1499999999999999e92 < z

    1. Initial program 63.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
      2. div-sub91.1%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{z}{z} - \frac{a}{z}}} \]
      3. *-inverses91.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{-36}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+92}:\\ \;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \end{array} \]

Alternative 11: 63.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+171} \lor \neg \left(y \leq 4 \cdot 10^{+148}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.80000000000000004e171 or 4.0000000000000002e148 < y

    1. Initial program 61.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    5. Taylor expanded in y around inf 63.4%

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

    if -2.80000000000000004e171 < y < 4.0000000000000002e148

    1. Initial program 96.4%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+171} \lor \neg \left(y \leq 4 \cdot 10^{+148}\right):\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 95.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 62.9% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.95 \cdot 10^{+119}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.7999999999999995e223 or 2.95e119 < a

    1. Initial program 83.1%

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

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

    if -6.7999999999999995e223 < a < 2.95e119

    1. Initial program 89.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified66.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+223}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.95 \cdot 10^{+119}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 53.4% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4999999999999998e186 or 1.89999999999999988e111 < y

    1. Initial program 63.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified66.2%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x} \]
    5. Taylor expanded in y around inf 62.1%

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

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

    if -7.4999999999999998e186 < y < 1.89999999999999988e111

    1. Initial program 97.3%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+186}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 15: 50.2% 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 87.8%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification53.1%

    \[\leadsto x \]

Developer target: 98.3% 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 2023321 
(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))))