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

Percentage Accurate: 85.4% → 98.2%
Time: 11.2s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\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 14 alternatives:

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

Initial Program: 85.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 76.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ t_2 := x - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+91}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (* t (/ y z)))))
   (if (<= z -1.4e+91)
     (+ x t)
     (if (<= z -2.6e-27)
       t_2
       (if (<= z -1.6e-87)
         t_1
         (if (<= z -5.1e-115)
           t_2
           (if (<= z 1.45e-68)
             t_1
             (if (<= z 1.1e+50)
               t_2
               (if (<= z 1.15e+73) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - (t * (y / z));
	double tmp;
	if (z <= -1.4e+91) {
		tmp = x + t;
	} else if (z <= -2.6e-27) {
		tmp = t_2;
	} else if (z <= -1.6e-87) {
		tmp = t_1;
	} else if (z <= -5.1e-115) {
		tmp = t_2;
	} else if (z <= 1.45e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 1.15e+73) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y / (a / t))
    t_2 = x - (t * (y / z))
    if (z <= (-1.4d+91)) then
        tmp = x + t
    else if (z <= (-2.6d-27)) then
        tmp = t_2
    else if (z <= (-1.6d-87)) then
        tmp = t_1
    else if (z <= (-5.1d-115)) then
        tmp = t_2
    else if (z <= 1.45d-68) then
        tmp = t_1
    else if (z <= 1.1d+50) then
        tmp = t_2
    else if (z <= 1.15d+73) then
        tmp = x - (t / (a / z))
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - (t * (y / z));
	double tmp;
	if (z <= -1.4e+91) {
		tmp = x + t;
	} else if (z <= -2.6e-27) {
		tmp = t_2;
	} else if (z <= -1.6e-87) {
		tmp = t_1;
	} else if (z <= -5.1e-115) {
		tmp = t_2;
	} else if (z <= 1.45e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 1.15e+73) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	t_2 = x - (t * (y / z))
	tmp = 0
	if z <= -1.4e+91:
		tmp = x + t
	elif z <= -2.6e-27:
		tmp = t_2
	elif z <= -1.6e-87:
		tmp = t_1
	elif z <= -5.1e-115:
		tmp = t_2
	elif z <= 1.45e-68:
		tmp = t_1
	elif z <= 1.1e+50:
		tmp = t_2
	elif z <= 1.15e+73:
		tmp = x - (t / (a / z))
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	t_2 = Float64(x - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (z <= -1.4e+91)
		tmp = Float64(x + t);
	elseif (z <= -2.6e-27)
		tmp = t_2;
	elseif (z <= -1.6e-87)
		tmp = t_1;
	elseif (z <= -5.1e-115)
		tmp = t_2;
	elseif (z <= 1.45e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 1.15e+73)
		tmp = Float64(x - Float64(t / Float64(a / z)));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	t_2 = x - (t * (y / z));
	tmp = 0.0;
	if (z <= -1.4e+91)
		tmp = x + t;
	elseif (z <= -2.6e-27)
		tmp = t_2;
	elseif (z <= -1.6e-87)
		tmp = t_1;
	elseif (z <= -5.1e-115)
		tmp = t_2;
	elseif (z <= 1.45e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 1.15e+73)
		tmp = x - (t / (a / z));
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+91], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.6e-27], t$95$2, If[LessEqual[z, -1.6e-87], t$95$1, If[LessEqual[z, -5.1e-115], t$95$2, If[LessEqual[z, 1.45e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 1.15e+73], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.3999999999999999e91 or 1.15e73 < z

    1. Initial program 70.5%

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

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

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

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

    if -1.3999999999999999e91 < z < -2.60000000000000017e-27 or -1.59999999999999989e-87 < z < -5.0999999999999997e-115 or 1.45e-68 < z < 1.10000000000000008e50

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(-\frac{t}{\frac{z}{y}}\right)} \]
      6. sub-neg74.3%

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z}{y}}} \]
      7. associate-/r/73.8%

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

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

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

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

    if -2.60000000000000017e-27 < z < -1.59999999999999989e-87 or -5.0999999999999997e-115 < z < 1.45e-68

    1. Initial program 90.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified86.0%

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

    if 1.10000000000000008e50 < z < 1.15e73

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+91}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-27}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 3: 76.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ t_2 := x - \frac{y \cdot t}{z}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+94}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-27}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+72}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (/ (* y t) z))))
   (if (<= z -3.1e+94)
     (+ x t)
     (if (<= z -4.2e-27)
       (- x (* t (/ y z)))
       (if (<= z -2.2e-87)
         t_1
         (if (<= z -3.5e-115)
           t_2
           (if (<= z 8.2e-69)
             t_1
             (if (<= z 1.1e+50)
               t_2
               (if (<= z 8.5e+72) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - ((y * t) / z);
	double tmp;
	if (z <= -3.1e+94) {
		tmp = x + t;
	} else if (z <= -4.2e-27) {
		tmp = x - (t * (y / z));
	} else if (z <= -2.2e-87) {
		tmp = t_1;
	} else if (z <= -3.5e-115) {
		tmp = t_2;
	} else if (z <= 8.2e-69) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 8.5e+72) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y / (a / t))
    t_2 = x - ((y * t) / z)
    if (z <= (-3.1d+94)) then
        tmp = x + t
    else if (z <= (-4.2d-27)) then
        tmp = x - (t * (y / z))
    else if (z <= (-2.2d-87)) then
        tmp = t_1
    else if (z <= (-3.5d-115)) then
        tmp = t_2
    else if (z <= 8.2d-69) then
        tmp = t_1
    else if (z <= 1.1d+50) then
        tmp = t_2
    else if (z <= 8.5d+72) then
        tmp = x - (t / (a / z))
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - ((y * t) / z);
	double tmp;
	if (z <= -3.1e+94) {
		tmp = x + t;
	} else if (z <= -4.2e-27) {
		tmp = x - (t * (y / z));
	} else if (z <= -2.2e-87) {
		tmp = t_1;
	} else if (z <= -3.5e-115) {
		tmp = t_2;
	} else if (z <= 8.2e-69) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 8.5e+72) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	t_2 = x - ((y * t) / z)
	tmp = 0
	if z <= -3.1e+94:
		tmp = x + t
	elif z <= -4.2e-27:
		tmp = x - (t * (y / z))
	elif z <= -2.2e-87:
		tmp = t_1
	elif z <= -3.5e-115:
		tmp = t_2
	elif z <= 8.2e-69:
		tmp = t_1
	elif z <= 1.1e+50:
		tmp = t_2
	elif z <= 8.5e+72:
		tmp = x - (t / (a / z))
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	t_2 = Float64(x - Float64(Float64(y * t) / z))
	tmp = 0.0
	if (z <= -3.1e+94)
		tmp = Float64(x + t);
	elseif (z <= -4.2e-27)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= -2.2e-87)
		tmp = t_1;
	elseif (z <= -3.5e-115)
		tmp = t_2;
	elseif (z <= 8.2e-69)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 8.5e+72)
		tmp = Float64(x - Float64(t / Float64(a / z)));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	t_2 = x - ((y * t) / z);
	tmp = 0.0;
	if (z <= -3.1e+94)
		tmp = x + t;
	elseif (z <= -4.2e-27)
		tmp = x - (t * (y / z));
	elseif (z <= -2.2e-87)
		tmp = t_1;
	elseif (z <= -3.5e-115)
		tmp = t_2;
	elseif (z <= 8.2e-69)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 8.5e+72)
		tmp = x - (t / (a / z));
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+94], N[(x + t), $MachinePrecision], If[LessEqual[z, -4.2e-27], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-87], t$95$1, If[LessEqual[z, -3.5e-115], t$95$2, If[LessEqual[z, 8.2e-69], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 8.5e+72], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.09999999999999991e94 or 8.5000000000000004e72 < z

    1. Initial program 70.5%

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

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

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

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

    if -3.09999999999999991e94 < z < -4.20000000000000031e-27

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z}{y}}} \]
      7. associate-/r/79.3%

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

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

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

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

    if -4.20000000000000031e-27 < z < -2.19999999999999988e-87 or -3.5000000000000002e-115 < z < 8.1999999999999998e-69

    1. Initial program 90.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified86.0%

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

    if -2.19999999999999988e-87 < z < -3.5000000000000002e-115 or 8.1999999999999998e-69 < z < 1.10000000000000008e50

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y \cdot t}{z}} \]
      4. *-commutative72.0%

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

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

    if 1.10000000000000008e50 < z < 8.5000000000000004e72

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{z}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+94}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-27}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-115}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+72}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 4: 76.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ t_2 := x - \frac{y \cdot t}{z}\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (/ (* y t) z))))
   (if (<= z -6.8e+90)
     (+ x t)
     (if (<= z -4.8e-27)
       (+ x (/ y (/ (- z) t)))
       (if (<= z -1.6e-87)
         t_1
         (if (<= z -5.1e-115)
           t_2
           (if (<= z 1.9e-68)
             t_1
             (if (<= z 1.1e+50)
               t_2
               (if (<= z 7.5e+71) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - ((y * t) / z);
	double tmp;
	if (z <= -6.8e+90) {
		tmp = x + t;
	} else if (z <= -4.8e-27) {
		tmp = x + (y / (-z / t));
	} else if (z <= -1.6e-87) {
		tmp = t_1;
	} else if (z <= -5.1e-115) {
		tmp = t_2;
	} else if (z <= 1.9e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 7.5e+71) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y / (a / t))
    t_2 = x - ((y * t) / z)
    if (z <= (-6.8d+90)) then
        tmp = x + t
    else if (z <= (-4.8d-27)) then
        tmp = x + (y / (-z / t))
    else if (z <= (-1.6d-87)) then
        tmp = t_1
    else if (z <= (-5.1d-115)) then
        tmp = t_2
    else if (z <= 1.9d-68) then
        tmp = t_1
    else if (z <= 1.1d+50) then
        tmp = t_2
    else if (z <= 7.5d+71) then
        tmp = x - (t / (a / z))
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - ((y * t) / z);
	double tmp;
	if (z <= -6.8e+90) {
		tmp = x + t;
	} else if (z <= -4.8e-27) {
		tmp = x + (y / (-z / t));
	} else if (z <= -1.6e-87) {
		tmp = t_1;
	} else if (z <= -5.1e-115) {
		tmp = t_2;
	} else if (z <= 1.9e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 7.5e+71) {
		tmp = x - (t / (a / z));
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	t_2 = x - ((y * t) / z)
	tmp = 0
	if z <= -6.8e+90:
		tmp = x + t
	elif z <= -4.8e-27:
		tmp = x + (y / (-z / t))
	elif z <= -1.6e-87:
		tmp = t_1
	elif z <= -5.1e-115:
		tmp = t_2
	elif z <= 1.9e-68:
		tmp = t_1
	elif z <= 1.1e+50:
		tmp = t_2
	elif z <= 7.5e+71:
		tmp = x - (t / (a / z))
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	t_2 = Float64(x - Float64(Float64(y * t) / z))
	tmp = 0.0
	if (z <= -6.8e+90)
		tmp = Float64(x + t);
	elseif (z <= -4.8e-27)
		tmp = Float64(x + Float64(y / Float64(Float64(-z) / t)));
	elseif (z <= -1.6e-87)
		tmp = t_1;
	elseif (z <= -5.1e-115)
		tmp = t_2;
	elseif (z <= 1.9e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 7.5e+71)
		tmp = Float64(x - Float64(t / Float64(a / z)));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	t_2 = x - ((y * t) / z);
	tmp = 0.0;
	if (z <= -6.8e+90)
		tmp = x + t;
	elseif (z <= -4.8e-27)
		tmp = x + (y / (-z / t));
	elseif (z <= -1.6e-87)
		tmp = t_1;
	elseif (z <= -5.1e-115)
		tmp = t_2;
	elseif (z <= 1.9e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 7.5e+71)
		tmp = x - (t / (a / z));
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+90], N[(x + t), $MachinePrecision], If[LessEqual[z, -4.8e-27], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-87], t$95$1, If[LessEqual[z, -5.1e-115], t$95$2, If[LessEqual[z, 1.9e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 7.5e+71], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.80000000000000036e90 or 7.50000000000000007e71 < z

    1. Initial program 70.5%

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

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

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

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

    if -6.80000000000000036e90 < z < -4.80000000000000004e-27

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000004e-27 < z < -1.59999999999999989e-87 or -5.0999999999999997e-115 < z < 1.90000000000000019e-68

    1. Initial program 90.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified86.0%

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

    if -1.59999999999999989e-87 < z < -5.0999999999999997e-115 or 1.90000000000000019e-68 < z < 1.10000000000000008e50

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y \cdot t}{z}} \]
      4. *-commutative72.0%

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

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

    if 1.10000000000000008e50 < z < 7.50000000000000007e71

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{z}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y}{\frac{-z}{t}}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 5: 76.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ t_2 := x - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (* t (/ y z)))))
   (if (<= z -7.8e+90)
     (+ x t)
     (if (<= z -3.8e-27)
       t_2
       (if (<= z -4.7e-87)
         t_1
         (if (<= z -2.6e-116)
           t_2
           (if (<= z 1.2e-68)
             t_1
             (if (<= z 1.1e+50) t_2 (if (<= z 7.5e+71) x (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - (t * (y / z));
	double tmp;
	if (z <= -7.8e+90) {
		tmp = x + t;
	} else if (z <= -3.8e-27) {
		tmp = t_2;
	} else if (z <= -4.7e-87) {
		tmp = t_1;
	} else if (z <= -2.6e-116) {
		tmp = t_2;
	} else if (z <= 1.2e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 7.5e+71) {
		tmp = x;
	} else {
		tmp = x + t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y / (a / t))
    t_2 = x - (t * (y / z))
    if (z <= (-7.8d+90)) then
        tmp = x + t
    else if (z <= (-3.8d-27)) then
        tmp = t_2
    else if (z <= (-4.7d-87)) then
        tmp = t_1
    else if (z <= (-2.6d-116)) then
        tmp = t_2
    else if (z <= 1.2d-68) then
        tmp = t_1
    else if (z <= 1.1d+50) then
        tmp = t_2
    else if (z <= 7.5d+71) then
        tmp = x
    else
        tmp = x + t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double t_2 = x - (t * (y / z));
	double tmp;
	if (z <= -7.8e+90) {
		tmp = x + t;
	} else if (z <= -3.8e-27) {
		tmp = t_2;
	} else if (z <= -4.7e-87) {
		tmp = t_1;
	} else if (z <= -2.6e-116) {
		tmp = t_2;
	} else if (z <= 1.2e-68) {
		tmp = t_1;
	} else if (z <= 1.1e+50) {
		tmp = t_2;
	} else if (z <= 7.5e+71) {
		tmp = x;
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	t_2 = x - (t * (y / z))
	tmp = 0
	if z <= -7.8e+90:
		tmp = x + t
	elif z <= -3.8e-27:
		tmp = t_2
	elif z <= -4.7e-87:
		tmp = t_1
	elif z <= -2.6e-116:
		tmp = t_2
	elif z <= 1.2e-68:
		tmp = t_1
	elif z <= 1.1e+50:
		tmp = t_2
	elif z <= 7.5e+71:
		tmp = x
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	t_2 = Float64(x - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (z <= -7.8e+90)
		tmp = Float64(x + t);
	elseif (z <= -3.8e-27)
		tmp = t_2;
	elseif (z <= -4.7e-87)
		tmp = t_1;
	elseif (z <= -2.6e-116)
		tmp = t_2;
	elseif (z <= 1.2e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 7.5e+71)
		tmp = x;
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	t_2 = x - (t * (y / z));
	tmp = 0.0;
	if (z <= -7.8e+90)
		tmp = x + t;
	elseif (z <= -3.8e-27)
		tmp = t_2;
	elseif (z <= -4.7e-87)
		tmp = t_1;
	elseif (z <= -2.6e-116)
		tmp = t_2;
	elseif (z <= 1.2e-68)
		tmp = t_1;
	elseif (z <= 1.1e+50)
		tmp = t_2;
	elseif (z <= 7.5e+71)
		tmp = x;
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+90], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.8e-27], t$95$2, If[LessEqual[z, -4.7e-87], t$95$1, If[LessEqual[z, -2.6e-116], t$95$2, If[LessEqual[z, 1.2e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 7.5e+71], x, N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-116}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8000000000000004e90 or 7.50000000000000007e71 < z

    1. Initial program 70.5%

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

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

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

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

    if -7.8000000000000004e90 < z < -3.8e-27 or -4.7000000000000001e-87 < z < -2.6e-116 or 1.19999999999999996e-68 < z < 1.10000000000000008e50

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(-\frac{t}{\frac{z}{y}}\right)} \]
      6. sub-neg74.3%

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z}{y}}} \]
      7. associate-/r/73.8%

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

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

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

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

    if -3.8e-27 < z < -4.7000000000000001e-87 or -2.6e-116 < z < 1.19999999999999996e-68

    1. Initial program 90.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified86.0%

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

    if 1.10000000000000008e50 < z < 7.50000000000000007e71

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification82.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-116}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 6: 84.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+107} \lor \neg \left(z \leq 6.8 \cdot 10^{+72}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.50000000000000019e107 or 6.7999999999999997e72 < z

    1. Initial program 70.6%

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

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

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

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

    if -9.50000000000000019e107 < z < 6.7999999999999997e72

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+107} \lor \neg \left(z \leq 6.8 \cdot 10^{+72}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\ \end{array} \]

Alternative 7: 87.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+108} \lor \neg \left(z \leq 9 \cdot 10^{+49}\right):\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5500000000000001e108 or 8.99999999999999965e49 < z

    1. Initial program 71.3%

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
      2. mul-1-neg67.9%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z \cdot t}{a - z}} \]
      7. *-commutative67.9%

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      9. div-sub93.3%

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      10. *-inverses93.3%

        \[\leadsto x - \frac{t}{\frac{a}{z} - \color{blue}{1}} \]
    6. Simplified93.3%

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

    if -1.5500000000000001e108 < z < 8.99999999999999965e49

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+108} \lor \neg \left(z \leq 9 \cdot 10^{+49}\right):\\ \;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\ \end{array} \]

Alternative 8: 84.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;x + t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999998e107 or 2.3500000000000001e73 < z

    1. Initial program 70.6%

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

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

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

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

    if -3.7999999999999998e107 < z < 2.3500000000000001e73

    1. Initial program 93.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+73}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 9: 87.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+111}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\

\mathbf{elif}\;z \leq 11.5:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\

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


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

    1. Initial program 67.5%

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
      2. mul-1-neg64.7%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z \cdot t}{a - z}} \]
      7. *-commutative64.7%

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      9. div-sub94.4%

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      10. *-inverses94.4%

        \[\leadsto x - \frac{t}{\frac{a}{z} - \color{blue}{1}} \]
    6. Simplified94.4%

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

    if -1.20000000000000003e111 < z < 11.5

    1. Initial program 92.8%

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

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

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

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

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

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

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

    if 11.5 < z

    1. Initial program 78.2%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    6. Simplified89.5%

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

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

Alternative 10: 75.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15e102 or 7.50000000000000007e71 < z

    1. Initial program 70.9%

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

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

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

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

    if -2.15e102 < z < 7.50000000000000007e71

    1. Initial program 93.3%

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

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

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

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

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

Alternative 11: 75.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq 7.4:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15e102 or 7.4000000000000004 < z

    1. Initial program 74.5%

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

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

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

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

    if -2.15e102 < z < 7.4000000000000004

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 75.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq 0.7:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15e102 or 0.69999999999999996 < z

    1. Initial program 74.5%

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

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

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

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

    if -2.15e102 < z < 0.69999999999999996

    1. Initial program 92.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified75.3%

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

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

Alternative 13: 63.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+112}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.00000000000000045e182 or 2.9000000000000002e112 < a

    1. Initial program 86.8%

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

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

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

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

    if -7.00000000000000045e182 < a < 2.9000000000000002e112

    1. Initial program 85.7%

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

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

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

      \[\leadsto x + \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+182}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+112}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 50.7% accurate, 11.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification49.0%

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023196 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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