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

Percentage Accurate: 98.3% → 98.3%
Time: 10.0s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Alternative 1: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Final simplification99.0%

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

Alternative 2: 74.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+170}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -11800000:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+74}:\\ \;\;\;\;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.7e+170)
   (+ x y)
   (if (<= z -11800000.0)
     (- x (* y (/ t z)))
     (if (<= z -6.2e-79)
       (- x (* z (/ y a)))
       (if (<= z -1.46e-94)
         (* y (- 1.0 (/ t z)))
         (if (<= z 8.8e+74) (+ x (* y (/ t a))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.7e+170) {
		tmp = x + y;
	} else if (z <= -11800000.0) {
		tmp = x - (y * (t / z));
	} else if (z <= -6.2e-79) {
		tmp = x - (z * (y / a));
	} else if (z <= -1.46e-94) {
		tmp = y * (1.0 - (t / z));
	} else if (z <= 8.8e+74) {
		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.7d+170)) then
        tmp = x + y
    else if (z <= (-11800000.0d0)) then
        tmp = x - (y * (t / z))
    else if (z <= (-6.2d-79)) then
        tmp = x - (z * (y / a))
    else if (z <= (-1.46d-94)) then
        tmp = y * (1.0d0 - (t / z))
    else if (z <= 8.8d+74) 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.7e+170) {
		tmp = x + y;
	} else if (z <= -11800000.0) {
		tmp = x - (y * (t / z));
	} else if (z <= -6.2e-79) {
		tmp = x - (z * (y / a));
	} else if (z <= -1.46e-94) {
		tmp = y * (1.0 - (t / z));
	} else if (z <= 8.8e+74) {
		tmp = x + (y * (t / a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.7e+170:
		tmp = x + y
	elif z <= -11800000.0:
		tmp = x - (y * (t / z))
	elif z <= -6.2e-79:
		tmp = x - (z * (y / a))
	elif z <= -1.46e-94:
		tmp = y * (1.0 - (t / z))
	elif z <= 8.8e+74:
		tmp = x + (y * (t / a))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.7e+170)
		tmp = Float64(x + y);
	elseif (z <= -11800000.0)
		tmp = Float64(x - Float64(y * Float64(t / z)));
	elseif (z <= -6.2e-79)
		tmp = Float64(x - Float64(z * Float64(y / a)));
	elseif (z <= -1.46e-94)
		tmp = Float64(y * Float64(1.0 - Float64(t / z)));
	elseif (z <= 8.8e+74)
		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.7e+170)
		tmp = x + y;
	elseif (z <= -11800000.0)
		tmp = x - (y * (t / z));
	elseif (z <= -6.2e-79)
		tmp = x - (z * (y / a));
	elseif (z <= -1.46e-94)
		tmp = y * (1.0 - (t / z));
	elseif (z <= 8.8e+74)
		tmp = x + (y * (t / a));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+170], N[(x + y), $MachinePrecision], If[LessEqual[z, -11800000.0], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+74], 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.7 \cdot 10^{+170}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq -11800000:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.7000000000000001e170 or 8.8000000000000005e74 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 90.1%

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

    if -1.7000000000000001e170 < z < -1.18e7

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/88.9%

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{\sqrt[3]{z - a} \cdot \sqrt[3]{z - a}}{z - t}}}}{\sqrt[3]{z - a}} \]
      5. pow299.1%

        \[\leadsto x + \frac{\frac{y}{\frac{\color{blue}{{\left(\sqrt[3]{z - a}\right)}^{2}}}{z - t}}}{\sqrt[3]{z - a}} \]
    3. Applied egg-rr99.1%

      \[\leadsto x + \color{blue}{\frac{\frac{y}{\frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}}{\sqrt[3]{z - a}}} \]
    4. Step-by-step derivation
      1. associate-/l/99.1%

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

      \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    6. Taylor expanded in t around inf 75.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{-t}}} \]
    8. Simplified80.6%

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}} \]
    11. Simplified80.6%

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

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

    if -1.18e7 < z < -6.1999999999999999e-79

    1. Initial program 96.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 81.7%

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{y}{\frac{a}{z - t}}\right)} \]
    5. Taylor expanded in z around inf 75.8%

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

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. mul-1-neg70.0%

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{a}} \]
    8. Simplified81.4%

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

    if -6.1999999999999999e-79 < z < -1.4599999999999999e-94

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 79.8%

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

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

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

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

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

    if -1.4599999999999999e-94 < z < 8.8000000000000005e74

    1. Initial program 98.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 85.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+170}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -11800000:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 80.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.24999999999999998e36 or 3.19999999999999989e-63 < z

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 88.2%

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

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

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

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

    if -2.24999999999999998e36 < z < -6.1999999999999999e-79

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 77.4%

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{y}{\frac{a}{z - t}}\right)} \]
    5. Taylor expanded in z around inf 66.4%

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

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. mul-1-neg66.5%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{\frac{a}{z}}\right)} \]
      3. sub-neg66.5%

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      5. *-commutative73.6%

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{a}} \]
    8. Simplified73.6%

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

    if -6.1999999999999999e-79 < z < -1.4599999999999999e-94

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 79.8%

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

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

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

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

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

    if -1.4599999999999999e-94 < z < 3.19999999999999989e-63

    1. Initial program 98.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 88.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+36}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-63}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \]

Alternative 4: 80.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.1e36

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 88.0%

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

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

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

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

    if -1.1e36 < z < -6.1999999999999999e-79

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 77.4%

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

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{y}{\frac{a}{z - t}}\right)} \]
    5. Taylor expanded in z around inf 66.4%

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

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. mul-1-neg66.5%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{\frac{a}{z}}\right)} \]
      3. sub-neg66.5%

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

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot z} \]
      5. *-commutative73.6%

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{a}} \]
    8. Simplified73.6%

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

    if -6.1999999999999999e-79 < z < -1.18e-94

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 79.8%

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

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

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

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

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

    if -1.18e-94 < z < 4.6000000000000003e-64

    1. Initial program 98.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 88.8%

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

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

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

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

    if 4.6000000000000003e-64 < z

    1. Initial program 98.8%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 68.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+36}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-64}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 5: 81.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -7 \cdot 10^{-95}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.7999999999999998 or -9.2000000000000002e-67 < z < -6.9999999999999994e-95

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 82.5%

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

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

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

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

    if -3.7999999999999998 < z < -9.2000000000000002e-67

    1. Initial program 95.7%

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

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

    if -6.9999999999999994e-95 < z < 6.5e-65

    1. Initial program 98.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 88.8%

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

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

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

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

    if 6.5e-65 < z

    1. Initial program 98.8%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 68.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-67}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-95}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-65}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 6: 74.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9000000000000001e77 or 3e74 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 84.7%

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

    if -1.9000000000000001e77 < z < -2.54999999999999994e-39 or -1.4599999999999999e-94 < z < 3e74

    1. Initial program 98.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 82.6%

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

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

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

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

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

    if -2.54999999999999994e-39 < z < -1.4599999999999999e-94

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 66.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+77}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-39}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+74}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 74.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0999999999999999e77 or 4.7000000000000002e73 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 84.7%

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

    if -2.0999999999999999e77 < z < -2.6e-39 or -1.4599999999999999e-94 < z < 4.7000000000000002e73

    1. Initial program 98.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 82.6%

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

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

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

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

    if -2.6e-39 < z < -1.4599999999999999e-94

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 66.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+77}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-39}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+73}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 86.9% accurate, 0.8× speedup?

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+73}:\\
\;\;\;\;x + \frac{y}{\frac{z - 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.6999999999999999e82

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 90.1%

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

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

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

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

    if -2.6999999999999999e82 < z < 2.6000000000000001e73

    1. Initial program 98.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/94.0%

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

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

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

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

        \[\leadsto x + \frac{\frac{y}{\frac{\color{blue}{{\left(\sqrt[3]{z - a}\right)}^{2}}}{z - t}}}{\sqrt[3]{z - a}} \]
    3. Applied egg-rr98.2%

      \[\leadsto x + \color{blue}{\frac{\frac{y}{\frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}}{\sqrt[3]{z - a}}} \]
    4. Step-by-step derivation
      1. associate-/l/98.0%

        \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    5. Simplified98.0%

      \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    6. Taylor expanded in t around inf 87.4%

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

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

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

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

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

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

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

    if 2.6000000000000001e73 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 63.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+82}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+73}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{-t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 9: 75.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.22 \cdot 10^{+76}:\\
\;\;\;\;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.75000000000000003e170 or 1.22000000000000002e76 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 90.1%

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

    if -1.75000000000000003e170 < z < -1.6500000000000001e-97

    1. Initial program 98.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/93.1%

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

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

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

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{\sqrt[3]{z - a} \cdot \sqrt[3]{z - a}}{z - t}}}}{\sqrt[3]{z - a}} \]
      5. pow299.0%

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

      \[\leadsto x + \color{blue}{\frac{\frac{y}{\frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}}{\sqrt[3]{z - a}}} \]
    4. Step-by-step derivation
      1. associate-/l/97.3%

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

      \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    6. Taylor expanded in t around inf 72.5%

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot t}}{z - a} \]
      4. distribute-rgt-neg-out72.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}} \]
    11. Simplified75.8%

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

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

    if -1.6500000000000001e-97 < z < 1.22000000000000002e76

    1. Initial program 98.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 85.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+170}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-97}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+76}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 10: 86.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e83

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 90.1%

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

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

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

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

    if -1.4e83 < z < 6.7000000000000001e75

    1. Initial program 98.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/94.0%

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

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

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

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

        \[\leadsto x + \frac{\frac{y}{\frac{\color{blue}{{\left(\sqrt[3]{z - a}\right)}^{2}}}{z - t}}}{\sqrt[3]{z - a}} \]
    3. Applied egg-rr98.2%

      \[\leadsto x + \color{blue}{\frac{\frac{y}{\frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}}{\sqrt[3]{z - a}}} \]
    4. Step-by-step derivation
      1. associate-/l/98.0%

        \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    5. Simplified98.0%

      \[\leadsto x + \color{blue}{\frac{y}{\sqrt[3]{z - a} \cdot \frac{{\left(\sqrt[3]{z - a}\right)}^{2}}{z - t}}} \]
    6. Taylor expanded in t around inf 87.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}} \]
    11. Simplified90.9%

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

    if 6.7000000000000001e75 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 63.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+83}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 6.7 \cdot 10^{+75}:\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 11: 62.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+81} \lor \neg \left(z \leq 2.3 \cdot 10^{+71}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.65e+81) (not (<= z 2.3e+71))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.65e+81) || !(z <= 2.3e+71)) {
		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 ((z <= (-1.65d+81)) .or. (.not. (z <= 2.3d+71))) 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 ((z <= -1.65e+81) || !(z <= 2.3e+71)) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.65e+81) or not (z <= 2.3e+71):
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.65e+81) || !(z <= 2.3e+71))
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.65e+81) || ~((z <= 2.3e+71)))
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+81], N[Not[LessEqual[z, 2.3e+71]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+81} \lor \neg \left(z \leq 2.3 \cdot 10^{+71}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e81 or 2.3000000000000002e71 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 85.4%

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

    if -1.65e81 < z < 2.3000000000000002e71

    1. Initial program 98.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 76.9%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    3. Taylor expanded in x around inf 55.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+81} \lor \neg \left(z \leq 2.3 \cdot 10^{+71}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 51.5% 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 99.0%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Taylor expanded in z around 0 62.6%

    \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
  3. Taylor expanded in x around inf 52.4%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification52.4%

    \[\leadsto x \]

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 2023301 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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