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

Percentage Accurate: 85.6% → 96.0%
Time: 7.5s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 85.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 74.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -6 \cdot 10^{+14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4800:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\ \;\;\;\;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 -6e+14)
     (+ x y)
     (if (<= z 1.8e-65)
       t_1
       (if (<= z 4800.0)
         (* y (- 1.0 (/ t z)))
         (if (<= z 9.8e+123) 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 <= -6e+14) {
		tmp = x + y;
	} else if (z <= 1.8e-65) {
		tmp = t_1;
	} else if (z <= 4800.0) {
		tmp = y * (1.0 - (t / z));
	} else if (z <= 9.8e+123) {
		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 <= (-6d+14)) then
        tmp = x + y
    else if (z <= 1.8d-65) then
        tmp = t_1
    else if (z <= 4800.0d0) then
        tmp = y * (1.0d0 - (t / z))
    else if (z <= 9.8d+123) 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 <= -6e+14) {
		tmp = x + y;
	} else if (z <= 1.8e-65) {
		tmp = t_1;
	} else if (z <= 4800.0) {
		tmp = y * (1.0 - (t / z));
	} else if (z <= 9.8e+123) {
		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 <= -6e+14:
		tmp = x + y
	elif z <= 1.8e-65:
		tmp = t_1
	elif z <= 4800.0:
		tmp = y * (1.0 - (t / z))
	elif z <= 9.8e+123:
		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 <= -6e+14)
		tmp = Float64(x + y);
	elseif (z <= 1.8e-65)
		tmp = t_1;
	elseif (z <= 4800.0)
		tmp = Float64(y * Float64(1.0 - Float64(t / z)));
	elseif (z <= 9.8e+123)
		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 <= -6e+14)
		tmp = x + y;
	elseif (z <= 1.8e-65)
		tmp = t_1;
	elseif (z <= 4800.0)
		tmp = y * (1.0 - (t / z));
	elseif (z <= 9.8e+123)
		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, -6e+14], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e-65], t$95$1, If[LessEqual[z, 4800.0], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+123], 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 -6 \cdot 10^{+14}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4800:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6e14 or 9.79999999999999952e123 < z

    1. Initial program 67.3%

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

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

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

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

    if -6e14 < z < 1.7999999999999999e-65 or 4800 < z < 9.79999999999999952e123

    1. Initial program 92.3%

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

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

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

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

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

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

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

    if 1.7999999999999999e-65 < z < 4800

    1. Initial program 99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4800:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 74.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 4200:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.4e14 or 9.79999999999999952e123 < z

    1. Initial program 67.3%

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

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

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

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

    if -3.4e14 < z < 1.7999999999999999e-65

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.7999999999999999e-65 < z < 4200

    1. Initial program 99.6%

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

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

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

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

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

    if 4200 < z < 9.79999999999999952e123

    1. Initial program 87.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4200:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 74.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 4200:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.8e14 or 9.79999999999999952e123 < z

    1. Initial program 67.3%

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

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

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

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

    if -2.8e14 < z < 1.7999999999999999e-65

    1. Initial program 93.1%

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

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

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

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

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

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

    if 1.7999999999999999e-65 < z < 4200

    1. Initial program 99.6%

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

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

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

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

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

    if 4200 < z < 9.79999999999999952e123

    1. Initial program 87.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 4200:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 81.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.7999999999999999e110 or 6.1999999999999999e-68 < z

    1. Initial program 74.0%

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

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

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

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

    if -5.7999999999999999e110 < z < -1.5499999999999999e-15

    1. Initial program 79.6%

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

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

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

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

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

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

    if -1.5499999999999999e-15 < z < 6.1999999999999999e-68

    1. Initial program 92.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+110}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \end{array} \]

Alternative 6: 62.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -26000000000:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-66}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6e10 or 3.59999999999999976e29 < z

    1. Initial program 70.5%

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

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

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

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

    if -2.6e10 < z < 7.9999999999999998e-66

    1. Initial program 93.1%

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

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

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

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

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

    if 7.9999999999999998e-66 < z < 3.59999999999999976e29

    1. Initial program 94.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -26000000000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-66}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 75.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.45e14 or 3.0000000000000001e213 < z

    1. Initial program 65.4%

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

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

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

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

    if -1.45e14 < z < 2.1e-86

    1. Initial program 92.8%

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

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

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

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

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

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

    if 2.1e-86 < z < 3.0000000000000001e213

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z} \cdot t} \]
      2. *-commutative80.3%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    12. Simplified80.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+213}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 75.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -52000000000000:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2e13 or 3.0000000000000001e213 < z

    1. Initial program 65.4%

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

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

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

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

    if -5.2e13 < z < 1.7e-86

    1. Initial program 92.8%

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

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

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

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

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

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

    if 1.7e-86 < z < 3.0000000000000001e213

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - y \cdot \frac{t}{z}} \]
    10. Step-by-step derivation
      1. clear-num80.1%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    11. Applied egg-rr80.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -52000000000000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+213}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 9: 81.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e11 or 2.8000000000000001e-67 < z

    1. Initial program 74.2%

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

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

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

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

    if -1.15e11 < z < 2.8000000000000001e-67

    1. Initial program 93.1%

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

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

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

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

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

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

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

Alternative 10: 87.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+62} \lor \neg \left(t \leq 2.55 \cdot 10^{-36}\right):\\
\;\;\;\;x - \frac{y}{z - a} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.09999999999999984e62 or 2.54999999999999987e-36 < t

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999984e62 < t < 2.54999999999999987e-36

    1. Initial program 84.8%

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

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

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

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

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

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

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

Alternative 11: 87.9% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999995e59

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z - a}} \]
    10. Step-by-step derivation
      1. clear-num88.7%

        \[\leadsto x - t \cdot \color{blue}{\frac{1}{\frac{z - a}{y}}} \]
      2. un-div-inv88.8%

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z - a}{y}}} \]
    11. Applied egg-rr88.8%

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

    if -9.9999999999999995e59 < t < 3.09999999999999984e-44

    1. Initial program 84.8%

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

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

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

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

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

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

    if 3.09999999999999984e-44 < t

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -112000000000:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-65}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.12e11 or 1.28e26 < z

    1. Initial program 70.5%

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

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

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

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

    if -1.12e11 < z < 1.75000000000000002e-65

    1. Initial program 93.1%

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

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

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

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

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

    if 1.75000000000000002e-65 < z < 1.28e26

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z}} \]
    9. Simplified77.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{t}{z}} \]
    10. Taylor expanded in x around 0 67.6%

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} \]
      3. distribute-rgt-neg-in67.6%

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

        \[\leadsto \color{blue}{y \cdot \frac{-t}{z}} \]
    12. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -112000000000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-65}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \frac{-t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 64.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -28000000000000:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8e13 or 1.7500000000000001e23 < z

    1. Initial program 71.3%

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

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

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

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

    if -2.8e13 < z < 1.7500000000000001e23

    1. Initial program 93.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -28000000000000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 14: 49.5% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+132}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.9999999999999996e132

    1. Initial program 60.5%

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

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

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

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

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

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

    if -5.9999999999999996e132 < z

    1. Initial program 87.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+132}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 51.6% 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 83.1%

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

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

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

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

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

    \[\leadsto x \]

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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