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

Percentage Accurate: 98.2% → 98.2%
Time: 9.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 98.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(z - a)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Derivation
  1. Initial program 97.7%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative97.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  3. Simplified97.7%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  4. Final simplification97.7%

    \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \]

Alternative 2: 82.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-58}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-81}:\\ \;\;\;\;x + y \cdot \frac{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 a))))))
   (if (<= z -3.5e+99)
     t_1
     (if (<= z -1.3e-58)
       (+ x (* y (- 1.0 (/ t z))))
       (if (<= z 1.85e-81) (+ 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 - a)));
	double tmp;
	if (z <= -3.5e+99) {
		tmp = t_1;
	} else if (z <= -1.3e-58) {
		tmp = x + (y * (1.0 - (t / z)));
	} else if (z <= 1.85e-81) {
		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 - a)))
    if (z <= (-3.5d+99)) then
        tmp = t_1
    else if (z <= (-1.3d-58)) then
        tmp = x + (y * (1.0d0 - (t / z)))
    else if (z <= 1.85d-81) 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 - a)));
	double tmp;
	if (z <= -3.5e+99) {
		tmp = t_1;
	} else if (z <= -1.3e-58) {
		tmp = x + (y * (1.0 - (t / z)));
	} else if (z <= 1.85e-81) {
		tmp = x + (y * (t / a));
	} 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.5e+99:
		tmp = t_1
	elif z <= -1.3e-58:
		tmp = x + (y * (1.0 - (t / z)))
	elif z <= 1.85e-81:
		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 - a))))
	tmp = 0.0
	if (z <= -3.5e+99)
		tmp = t_1;
	elseif (z <= -1.3e-58)
		tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z))));
	elseif (z <= 1.85e-81)
		tmp = Float64(x + Float64(y * Float64(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 - a)));
	tmp = 0.0;
	if (z <= -3.5e+99)
		tmp = t_1;
	elseif (z <= -1.3e-58)
		tmp = x + (y * (1.0 - (t / z)));
	elseif (z <= 1.85e-81)
		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 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+99], t$95$1, If[LessEqual[z, -1.3e-58], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-81], N[(x + N[(y * N[(t / a), $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.5 \cdot 10^{+99}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4999999999999998e99 or 1.84999999999999993e-81 < z

    1. Initial program 99.9%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{z - a}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u62.9%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot z}{z - a}\right)\right)} \]
      2. expm1-udef53.0%

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y \cdot z}{z - a}\right)} - 1\right)} \]
      3. associate-/l*56.8%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{z - a}{z}}}\right)} - 1\right) \]
      4. associate-/r/56.8%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{z - a} \cdot z}\right)} - 1\right) \]
    4. Applied egg-rr56.8%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{z - a} \cdot z\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def59.7%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{z - a} \cdot z\right)\right)} \]
      2. expm1-log1p80.4%

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

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

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

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

    if -3.4999999999999998e99 < z < -1.30000000000000003e-58

    1. Initial program 100.0%

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

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

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

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

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

    if -1.30000000000000003e-58 < z < 1.84999999999999993e-81

    1. Initial program 93.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+99}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-58}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-81}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 3: 81.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-81}:\\ \;\;\;\;x + y \cdot \frac{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 a))))))
   (if (<= z -1.5e+98)
     t_1
     (if (<= z -1.8e-133)
       (+ x (/ (* y (- z t)) z))
       (if (<= z 2.7e-81) (+ 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 - a)));
	double tmp;
	if (z <= -1.5e+98) {
		tmp = t_1;
	} else if (z <= -1.8e-133) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 2.7e-81) {
		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 - a)))
    if (z <= (-1.5d+98)) then
        tmp = t_1
    else if (z <= (-1.8d-133)) then
        tmp = x + ((y * (z - t)) / z)
    else if (z <= 2.7d-81) 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 - a)));
	double tmp;
	if (z <= -1.5e+98) {
		tmp = t_1;
	} else if (z <= -1.8e-133) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 2.7e-81) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / (z - a)))
	tmp = 0
	if z <= -1.5e+98:
		tmp = t_1
	elif z <= -1.8e-133:
		tmp = x + ((y * (z - t)) / z)
	elif z <= 2.7e-81:
		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 - a))))
	tmp = 0.0
	if (z <= -1.5e+98)
		tmp = t_1;
	elseif (z <= -1.8e-133)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z));
	elseif (z <= 2.7e-81)
		tmp = Float64(x + Float64(y * Float64(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 - a)));
	tmp = 0.0;
	if (z <= -1.5e+98)
		tmp = t_1;
	elseif (z <= -1.8e-133)
		tmp = x + ((y * (z - t)) / z);
	elseif (z <= 2.7e-81)
		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 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+98], t$95$1, If[LessEqual[z, -1.8e-133], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-81], N[(x + N[(y * N[(t / a), $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 -1.5 \cdot 10^{+98}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5000000000000001e98 or 2.6999999999999999e-81 < z

    1. Initial program 99.9%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{z - a}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u62.9%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot z}{z - a}\right)\right)} \]
      2. expm1-udef53.0%

        \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y \cdot z}{z - a}\right)} - 1\right)} \]
      3. associate-/l*56.8%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{z - a}{z}}}\right)} - 1\right) \]
      4. associate-/r/56.8%

        \[\leadsto x + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{z - a} \cdot z}\right)} - 1\right) \]
    4. Applied egg-rr56.8%

      \[\leadsto x + \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{z - a} \cdot z\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def59.7%

        \[\leadsto x + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{z - a} \cdot z\right)\right)} \]
      2. expm1-log1p80.4%

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

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

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

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

    if -1.5000000000000001e98 < z < -1.8000000000000002e-133

    1. Initial program 97.7%

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

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

    if -1.8000000000000002e-133 < z < 2.6999999999999999e-81

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+98}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-81}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 4: 81.4% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8e100 or 1.9999999999999999e-81 < z

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - a}{z}}} + x \]
      3. div-sub87.5%

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

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

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

    if -1.8e100 < z < -1.8000000000000002e-133

    1. Initial program 97.7%

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

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

    if -1.8000000000000002e-133 < z < 1.9999999999999999e-81

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-81}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \end{array} \]

Alternative 5: 82.6% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.39999999999999997e100 or 0.25 < z

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{\frac{z}{z} - \frac{a}{z}}} + x \]
      4. *-inverses88.9%

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

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

    if -5.39999999999999997e100 < z < -1.8000000000000002e-133

    1. Initial program 97.7%

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

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

    if -1.8000000000000002e-133 < z < 0.25

    1. Initial program 95.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+100}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 0.25:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \end{array} \]

Alternative 6: 76.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75000000000000012e101 or 3.1499999999999999e41 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified77.2%

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

    if -1.75000000000000012e101 < z < -3.5000000000000001e-59

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5000000000000001e-59 < z < 3.1499999999999999e41

    1. Initial program 95.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+101}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-59}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{+41}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 7: 75.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.69999999999999971e101 or 4.99999999999999989e37 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified77.2%

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

    if -4.69999999999999971e101 < z < -1.75000000000000001e-133

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{t}{z}} \]
      2. clear-num75.1%

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

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

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

    if -1.75000000000000001e-133 < z < 4.99999999999999989e37

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{+101}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-133}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+37}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 8: 76.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.34999999999999985e101 or 1.44999999999999997e35 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified77.2%

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

    if -2.34999999999999985e101 < z < -1.8000000000000002e-133

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8000000000000002e-133 < z < 1.44999999999999997e35

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{+101}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-133}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+35}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 9: 76.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.30000000000000011e101 or 1.4999999999999999e41 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified77.2%

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

    if -3.30000000000000011e101 < z < -4.3999999999999999e-134

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e-134 < z < 1.4999999999999999e41

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+101}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-134}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+41}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 10: 81.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-59} \lor \neg \left(z \leq 7 \cdot 10^{+34}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.50000000000000014e-59 or 6.99999999999999996e34 < z

    1. Initial program 99.9%

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

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

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

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

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

    if -5.50000000000000014e-59 < z < 6.99999999999999996e34

    1. Initial program 95.1%

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

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

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

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

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

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

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

Alternative 11: 86.1% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4000000000000002e97 or 1.35e25 < z

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{\frac{z}{z} - \frac{a}{z}}} + x \]
      4. *-inverses89.4%

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

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

    if -4.4000000000000002e97 < z < 1.35e25

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 64.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-32} \lor \neg \left(z \leq 1.85 \cdot 10^{+33}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6000000000000001e-32 or 1.8499999999999999e33 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified72.0%

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

    if -1.6000000000000001e-32 < z < 1.8499999999999999e33

    1. Initial program 95.2%

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{\frac{y}{\frac{a}{z}}}\right) \]
      3. distribute-neg-frac60.8%

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

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

        \[\leadsto x + \color{blue}{\frac{-y}{a} \cdot z} \]
      2. add-sqr-sqrt28.8%

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

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

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

        \[\leadsto x + \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{a} \cdot z \]
      6. add-sqr-sqrt57.3%

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

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

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

Alternative 13: 76.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+101} \lor \neg \left(z \leq 4.1 \cdot 10^{+40}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.75000000000000012e101 or 4.1000000000000002e40 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified77.2%

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

    if -1.75000000000000012e101 < z < 4.1000000000000002e40

    1. Initial program 96.1%

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

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

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

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

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

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

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

Alternative 14: 98.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 15: 64.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-59} \lor \neg \left(z \leq 1.8 \cdot 10^{+33}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.4999999999999994e-59 or 1.8000000000000001e33 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified71.9%

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

    if -9.4999999999999994e-59 < z < 1.8000000000000001e33

    1. Initial program 95.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-59} \lor \neg \left(z \leq 1.8 \cdot 10^{+33}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 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 97.7%

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

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

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

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

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