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

Percentage Accurate: 86.1% → 95.9%
Time: 9.5s
Alternatives: 10
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 10 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: 86.1% 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: 95.9% 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 84.7%

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

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

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

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

Alternative 2: 82.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.60000000000000004e49 or 9.79999999999999977e-60 < z

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

    if -4.60000000000000004e49 < z < -3.29999999999999984e-56 or -8.29999999999999976e-274 < z < 9.79999999999999977e-60

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-56 < z < -4.2e-74

    1. Initial program 99.2%

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

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

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

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

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

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

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

    if -4.2e-74 < z < -8.29999999999999976e-274

    1. Initial program 86.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{z - a}{z - t}}} \]
    4. Step-by-step derivation
      1. clear-num91.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot t} \]
    11. Simplified90.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-56}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -8.3 \cdot 10^{-274}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-60}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \end{array} \]

Alternative 3: 82.5% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.40000000000000023e43 or 7.4000000000000005e-60 < z

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

    if -2.40000000000000023e43 < z < -8.7999999999999996e-10

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.7999999999999996e-10 < z < -1.6999999999999999e-41

    1. Initial program 100.0%

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

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

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

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

    if -1.6999999999999999e-41 < z < -4.5e-92

    1. Initial program 99.6%

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

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

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

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

    if -4.5e-92 < z < 7.4000000000000005e-60

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+43}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-60}:\\ \;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \end{array} \]

Alternative 4: 82.5% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -7.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-60}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.60000000000000021e43 or 9.00000000000000001e-60 < z

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

    if -2.60000000000000021e43 < z < -1.01999999999999999e-9

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.01999999999999999e-9 < z < -2.10000000000000013e-41

    1. Initial program 100.0%

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

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

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

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

    if -2.10000000000000013e-41 < z < -7.4000000000000004e-91

    1. Initial program 99.6%

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

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

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

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

    if -7.4000000000000004e-91 < z < 9.00000000000000001e-60

    1. Initial program 91.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+43}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-9}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-60}:\\ \;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \end{array} \]

Alternative 5: 82.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-74} \lor \neg \left(z \leq 2.9 \cdot 10^{-91}\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6000000000000002e-74 or 2.9000000000000001e-91 < z

    1. Initial program 80.7%

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

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

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

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

    if -3.6000000000000002e-74 < z < 2.9000000000000001e-91

    1. Initial program 91.3%

      \[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}{\frac{z - a}{z - t}}} \]
    3. Simplified95.6%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{z - a}{z - t}}} \]
    4. Step-by-step derivation
      1. clear-num95.0%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+46} \lor \neg \left(z \leq 9.8 \cdot 10^{-60}\right):\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999995e46 or 9.79999999999999977e-60 < z

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

    if -1.84999999999999995e46 < z < 9.79999999999999977e-60

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+56} \lor \neg \left(z \leq 9 \cdot 10^{-60}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.50000000000000003e56 or 9.00000000000000001e-60 < z

    1. Initial program 73.6%

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

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

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

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

    if -1.50000000000000003e56 < z < 9.00000000000000001e-60

    1. Initial program 92.9%

      \[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}{\frac{z - a}{z - t}}} \]
    3. Simplified96.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.79999999999999999e56 or 9.49999999999999958e-60 < z

    1. Initial program 73.6%

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

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

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

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

    if -1.79999999999999999e56 < z < 9.49999999999999958e-60

    1. Initial program 92.9%

      \[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}{\frac{z - a}{z - t}}} \]
    3. Simplified96.4%

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

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

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

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

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

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

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

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

Alternative 9: 62.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-94}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.39999999999999999e-182 or 3.9000000000000002e-94 < z

    1. Initial program 81.1%

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

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

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

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

    if -5.39999999999999999e-182 < z < 3.9000000000000002e-94

    1. Initial program 93.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-182}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-94}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 10: 51.1% 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 84.7%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification47.7%

    \[\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 2023238 
(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))))