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

Percentage Accurate: 85.5% → 95.4%
Time: 12.0s
Alternatives: 13
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 13 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.5% 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.4% 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.5%

    \[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. Final simplification96.9%

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

Alternative 2: 75.9% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.7999999999999998e107 or -4.6e68 < z < -1.14999999999999997e-100 or 2.30000000000000001e150 < z

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

    if -3.7999999999999998e107 < z < -4.6e68

    1. Initial program 92.2%

      \[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 89.0%

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

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

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

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

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

    if -1.14999999999999997e-100 < z < -1.25e-198

    1. Initial program 99.9%

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

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

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

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

    if -1.25e-198 < z < 6.00000000000000023e-26

    1. Initial program 98.7%

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

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

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

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

    if 6.00000000000000023e-26 < z < 2.30000000000000001e150

    1. Initial program 83.1%

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      2. distribute-lft-neg-out80.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{+68}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-100}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-198}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-26}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+150}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 3: 77.8% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -8.6 \cdot 10^{-103}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.7999999999999998e107 or -3.0999999999999998e68 < z < -8.60000000000000045e-103

    1. Initial program 76.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{z - a}{y}}} \]
      3. associate-/r/88.0%

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

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

    if -3.7999999999999998e107 < z < -3.0999999999999998e68

    1. Initial program 92.2%

      \[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 89.0%

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

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

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

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

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

    if -8.60000000000000045e-103 < z < -6.90000000000000016e-192

    1. Initial program 99.9%

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

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

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

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

    if -6.90000000000000016e-192 < z < 9.19999999999999965e-29

    1. Initial program 98.7%

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

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

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

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

    if 9.19999999999999965e-29 < z

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
      3. associate-/r/90.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{+68}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-103}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -6.9 \cdot 10^{-192}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-29}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \end{array} \]

Alternative 4: 78.6% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.7999999999999998e107 or 1.69999999999999989e-32 < z

    1. Initial program 72.6%

      \[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 a around 0 69.0%

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

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

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

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

    if -3.7999999999999998e107 < z < -5.8000000000000002e-104

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

    if -5.8000000000000002e-104 < z < -6.90000000000000016e-192

    1. Initial program 99.9%

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

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

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

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

    if -6.90000000000000016e-192 < z < 1.69999999999999989e-32

    1. Initial program 98.7%

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

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

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

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

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

Alternative 5: 75.9% accurate, 0.8× speedup?

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

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

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

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

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


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

    1. Initial program 66.9%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified89.3%

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

    if -3.7999999999999998e107 < z < 8.0000000000000003e-26

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

    if 8.0000000000000003e-26 < z < 1.24999999999999994e157

    1. Initial program 82.2%

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      2. distribute-lft-neg-out79.8%

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

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

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

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

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

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

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

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

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

Alternative 6: 81.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 1.22 \cdot 10^{-45}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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


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

    1. Initial program 73.2%

      \[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 a around 0 69.0%

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

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

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

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

    if -3.7999999999999998e107 < z < 1.22000000000000007e-45

    1. Initial program 96.2%

      \[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 a around inf 83.7%

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

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

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

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

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

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

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

Alternative 7: 85.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 71.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 68.5%

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

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

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

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

    if -3.7999999999999998e107 < z < 2.1e13

    1. Initial program 95.8%

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

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

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

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

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

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

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

Alternative 8: 74.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 75.5%

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      2. distribute-lft-neg-out75.5%

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

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

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

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

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

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

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

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

    if -2.1e225 < t < 3.00000000000000017e-47

    1. Initial program 82.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{z - a}{y}}} \]
      3. associate-/r/83.5%

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

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

    if 3.00000000000000017e-47 < t

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 61.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-243}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1499999999999999e47 or 8.10000000000000029e-78 < z

    1. Initial program 75.0%

      \[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 78.2%

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified78.2%

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

    if -1.1499999999999999e47 < z < 2.25000000000000009e-243

    1. Initial program 96.0%

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

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

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

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

    if 2.25000000000000009e-243 < z < 8.10000000000000029e-78

    1. Initial program 99.9%

      \[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 inf 89.3%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      3. distribute-neg-frac54.2%

        \[\leadsto \color{blue}{\frac{-y}{\frac{a}{z - t}}} \]
    9. Simplified54.2%

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

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

        \[\leadsto \frac{-y}{\color{blue}{\frac{-1 \cdot a}{t}}} \]
      2. neg-mul-151.7%

        \[\leadsto \frac{-y}{\frac{\color{blue}{-a}}{t}} \]
    12. Simplified51.7%

      \[\leadsto \frac{-y}{\color{blue}{\frac{-a}{t}}} \]
    13. Taylor expanded in y around 0 54.5%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    15. Simplified51.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+47}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-243}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.1 \cdot 10^{-78}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 10: 60.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-243}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4499999999999999e47 or 6.5000000000000003e-79 < z

    1. Initial program 75.0%

      \[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 78.2%

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified78.2%

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

    if -1.4499999999999999e47 < z < 1.25e-243

    1. Initial program 96.0%

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

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

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

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

    if 1.25e-243 < z < 6.5000000000000003e-79

    1. Initial program 99.9%

      \[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 inf 89.3%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a}{z - t}}} \]
      3. distribute-neg-frac54.2%

        \[\leadsto \color{blue}{\frac{-y}{\frac{a}{z - t}}} \]
    9. Simplified54.2%

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

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

        \[\leadsto \frac{-y}{\color{blue}{\frac{-1 \cdot a}{t}}} \]
      2. neg-mul-151.7%

        \[\leadsto \frac{-y}{\frac{\color{blue}{-a}}{t}} \]
    12. Simplified51.7%

      \[\leadsto \frac{-y}{\color{blue}{\frac{-a}{t}}} \]
    13. Step-by-step derivation
      1. associate-/r/54.5%

        \[\leadsto \color{blue}{\frac{-y}{-a} \cdot t} \]
      2. frac-2neg54.5%

        \[\leadsto \color{blue}{\frac{-\left(-y\right)}{-\left(-a\right)}} \cdot t \]
      3. remove-double-neg54.5%

        \[\leadsto \frac{\color{blue}{y}}{-\left(-a\right)} \cdot t \]
      4. remove-double-neg54.5%

        \[\leadsto \frac{y}{\color{blue}{a}} \cdot t \]
    14. Applied egg-rr54.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-243}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 76.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 71.1%

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

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

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

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

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

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

    if -9.50000000000000019e107 < z < 2.5999999999999999e38

    1. Initial program 95.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    7. Simplified78.0%

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

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

Alternative 12: 62.8% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.14999999999999997e47 or 6.50000000000000052e42 < z

    1. Initial program 72.6%

      \[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 81.7%

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

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

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

    if -2.14999999999999997e47 < z < 6.50000000000000052e42

    1. Initial program 96.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+47}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 50.5% accurate, 11.0× speedup?

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

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

    \[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 x around inf 53.1%

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

    \[\leadsto x \]

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023283 
(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))))