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

Percentage Accurate: 86.0% → 98.1%
Time: 9.8s
Alternatives: 16
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 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: 86.0% 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: 98.1% 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 87.1%

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

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

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

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

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

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

Alternative 2: 74.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+200}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y (- z t)) z))))
   (if (<= z -4.8e+120)
     (+ y x)
     (if (<= z -1.55e-153)
       t_1
       (if (<= z 1.35e-191)
         (+ x (/ (* y t) a))
         (if (<= z 6.2e+200) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * (z - t)) / z);
	double tmp;
	if (z <= -4.8e+120) {
		tmp = y + x;
	} else if (z <= -1.55e-153) {
		tmp = t_1;
	} else if (z <= 1.35e-191) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.2e+200) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + ((y * (z - t)) / z)
    if (z <= (-4.8d+120)) then
        tmp = y + x
    else if (z <= (-1.55d-153)) then
        tmp = t_1
    else if (z <= 1.35d-191) then
        tmp = x + ((y * t) / a)
    else if (z <= 6.2d+200) then
        tmp = t_1
    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 t_1 = x + ((y * (z - t)) / z);
	double tmp;
	if (z <= -4.8e+120) {
		tmp = y + x;
	} else if (z <= -1.55e-153) {
		tmp = t_1;
	} else if (z <= 1.35e-191) {
		tmp = x + ((y * t) / a);
	} else if (z <= 6.2e+200) {
		tmp = t_1;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * (z - t)) / z)
	tmp = 0
	if z <= -4.8e+120:
		tmp = y + x
	elif z <= -1.55e-153:
		tmp = t_1
	elif z <= 1.35e-191:
		tmp = x + ((y * t) / a)
	elif z <= 6.2e+200:
		tmp = t_1
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * Float64(z - t)) / z))
	tmp = 0.0
	if (z <= -4.8e+120)
		tmp = Float64(y + x);
	elseif (z <= -1.55e-153)
		tmp = t_1;
	elseif (z <= 1.35e-191)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (z <= 6.2e+200)
		tmp = t_1;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * (z - t)) / z);
	tmp = 0.0;
	if (z <= -4.8e+120)
		tmp = y + x;
	elseif (z <= -1.55e-153)
		tmp = t_1;
	elseif (z <= 1.35e-191)
		tmp = x + ((y * t) / a);
	elseif (z <= 6.2e+200)
		tmp = t_1;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+120], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.55e-153], t$95$1, If[LessEqual[z, 1.35e-191], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+200], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.80000000000000002e120 or 6.19999999999999988e200 < z

    1. Initial program 61.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 93.6%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative93.6%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified93.6%

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

    if -4.80000000000000002e120 < z < -1.54999999999999997e-153 or 1.34999999999999999e-191 < z < 6.19999999999999988e200

    1. Initial program 94.2%

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

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

    if -1.54999999999999997e-153 < z < 1.34999999999999999e-191

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-153}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+200}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 50000000000:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+204}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+285}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (/ t z)))))
   (if (<= t -2.9e+53)
     t_1
     (if (<= t 50000000000.0)
       (+ y x)
       (if (<= t 3.6e+204)
         (+ x (* y (/ t a)))
         (if (<= t 3.8e+285) t_1 (+ x (/ (* y t) a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (t / z));
	double tmp;
	if (t <= -2.9e+53) {
		tmp = t_1;
	} else if (t <= 50000000000.0) {
		tmp = y + x;
	} else if (t <= 3.6e+204) {
		tmp = x + (y * (t / a));
	} else if (t <= 3.8e+285) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x - (y * (t / z))
    if (t <= (-2.9d+53)) then
        tmp = t_1
    else if (t <= 50000000000.0d0) then
        tmp = y + x
    else if (t <= 3.6d+204) then
        tmp = x + (y * (t / a))
    else if (t <= 3.8d+285) then
        tmp = t_1
    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 t_1 = x - (y * (t / z));
	double tmp;
	if (t <= -2.9e+53) {
		tmp = t_1;
	} else if (t <= 50000000000.0) {
		tmp = y + x;
	} else if (t <= 3.6e+204) {
		tmp = x + (y * (t / a));
	} else if (t <= 3.8e+285) {
		tmp = t_1;
	} else {
		tmp = x + ((y * t) / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (t / z))
	tmp = 0
	if t <= -2.9e+53:
		tmp = t_1
	elif t <= 50000000000.0:
		tmp = y + x
	elif t <= 3.6e+204:
		tmp = x + (y * (t / a))
	elif t <= 3.8e+285:
		tmp = t_1
	else:
		tmp = x + ((y * t) / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(t / z)))
	tmp = 0.0
	if (t <= -2.9e+53)
		tmp = t_1;
	elseif (t <= 50000000000.0)
		tmp = Float64(y + x);
	elseif (t <= 3.6e+204)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (t <= 3.8e+285)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y * t) / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (y * (t / z));
	tmp = 0.0;
	if (t <= -2.9e+53)
		tmp = t_1;
	elseif (t <= 50000000000.0)
		tmp = y + x;
	elseif (t <= 3.6e+204)
		tmp = x + (y * (t / a));
	elseif (t <= 3.8e+285)
		tmp = t_1;
	else
		tmp = x + ((y * t) / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+53], t$95$1, If[LessEqual[t, 50000000000.0], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.6e+204], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+285], t$95$1, N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 50000000000:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+204}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+285}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9000000000000002e53 or 3.6000000000000002e204 < t < 3.7999999999999999e285

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000002e53 < t < 5e10

    1. Initial program 87.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if 5e10 < t < 3.6000000000000002e204

    1. Initial program 91.8%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. un-div-inv78.6%

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

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

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

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

    if 3.7999999999999999e285 < t

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+53}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 50000000000:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+204}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+285}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+20}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+204}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.5000000000000002e53

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    13. Applied egg-rr72.8%

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

    if -2.5000000000000002e53 < t < 3e20

    1. Initial program 87.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if 3e20 < t < 7.80000000000000033e204

    1. Initial program 91.8%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. un-div-inv78.6%

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

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

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

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

    if 7.80000000000000033e204 < t < 1.39999999999999998e284

    1. Initial program 84.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} + x \]
    5. Simplified69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.39999999999999998e284 < t

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+53}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+20}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+204}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+284}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+19}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 1.52 \cdot 10^{+206}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.4e52

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    13. Applied egg-rr72.8%

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

    if -4.4e52 < t < 3.6e19

    1. Initial program 87.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.2%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.2%

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

    if 3.6e19 < t < 1.52e206

    1. Initial program 91.8%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. un-div-inv78.6%

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

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

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

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

    if 1.52e206 < t < 1.61999999999999993e263

    1. Initial program 93.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} + x \]
    5. Simplified70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.61999999999999993e263 < t

    1. Initial program 72.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+52}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+19}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{+206}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{+263}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-151}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-168}:\\ \;\;\;\;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 a))))))
   (if (<= z -3.6e-40)
     t_1
     (if (<= z -1.8e-151)
       (+ x (/ (* y (- z t)) z))
       (if (<= z 2.5e-168) (+ 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.6e-40) {
		tmp = t_1;
	} else if (z <= -1.8e-151) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 2.5e-168) {
		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.6d-40)) then
        tmp = t_1
    else if (z <= (-1.8d-151)) then
        tmp = x + ((y * (z - t)) / z)
    else if (z <= 2.5d-168) 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.6e-40) {
		tmp = t_1;
	} else if (z <= -1.8e-151) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 2.5e-168) {
		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.6e-40:
		tmp = t_1
	elif z <= -1.8e-151:
		tmp = x + ((y * (z - t)) / z)
	elif z <= 2.5e-168:
		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.6e-40)
		tmp = t_1;
	elseif (z <= -1.8e-151)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z));
	elseif (z <= 2.5e-168)
		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 - a)));
	tmp = 0.0;
	if (z <= -3.6e-40)
		tmp = t_1;
	elseif (z <= -1.8e-151)
		tmp = x + ((y * (z - t)) / z);
	elseif (z <= 2.5e-168)
		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.6e-40], t$95$1, If[LessEqual[z, -1.8e-151], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-168], N[(x + N[(N[(y * t), $MachinePrecision] / a), $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.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.6e-40 or 2.50000000000000001e-168 < z

    1. Initial program 81.7%

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

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

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

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

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

    if -3.6e-40 < z < -1.80000000000000016e-151

    1. Initial program 96.7%

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

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

    if -1.80000000000000016e-151 < z < 2.50000000000000001e-168

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-40}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-151}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-168}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.49999999999999982e-40

    1. Initial program 78.1%

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

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

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

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

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

    if -2.49999999999999982e-40 < z < -2.25e-153

    1. Initial program 96.7%

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

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

    if -2.25e-153 < z < 1.29999999999999993e-191

    1. Initial program 99.9%

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

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

    if 1.29999999999999993e-191 < z

    1. Initial program 84.6%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} + x \]
    5. Simplified86.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-40}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-153}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 87.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.09999999999999989e28 or 2.80000000000000012e75 < t

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{z - a} \cdot \frac{t}{1}} \]
      9. /-rgt-identity90.8%

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

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

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

    if -2.09999999999999989e28 < t < 2.80000000000000012e75

    1. Initial program 88.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+28} \lor \neg \left(t \leq 2.8 \cdot 10^{+75}\right):\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 87.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e22 < t < 2.80000000000000012e75

    1. Initial program 88.5%

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

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

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

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

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

    if 2.80000000000000012e75 < t

    1. Initial program 88.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 86.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+75}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 73.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+23} \lor \neg \left(z \leq 3.2 \cdot 10^{-168}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.0000000000000004e23 or 3.20000000000000006e-168 < z

    1. Initial program 80.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.3%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.3%

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

    if -7.0000000000000004e23 < z < 3.20000000000000006e-168

    1. Initial program 98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+23} \lor \neg \left(z \leq 3.2 \cdot 10^{-168}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-161}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -1.7e-122) x (if (<= x 2.6e-161) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.7e-122) {
		tmp = x;
	} else if (x <= 2.6e-161) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-1.7d-122)) then
        tmp = x
    else if (x <= 2.6d-161) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.7e-122) {
		tmp = x;
	} else if (x <= 2.6e-161) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -1.7e-122:
		tmp = x
	elif x <= 2.6e-161:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -1.7e-122)
		tmp = x;
	elseif (x <= 2.6e-161)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -1.7e-122)
		tmp = x;
	elseif (x <= 2.6e-161)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.7e-122], x, If[LessEqual[x, 2.6e-161], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-122}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.6 \cdot 10^{-161}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.6999999999999999e-122 or 2.59999999999999995e-161 < x

    1. Initial program 87.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 61.9%

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

    if -1.6999999999999999e-122 < x < 2.59999999999999995e-161

    1. Initial program 86.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-161}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.60000000000000004e221

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-t}{z}} \]
    14. Simplified60.5%

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

    if -2.60000000000000004e221 < t

    1. Initial program 87.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.3%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+221}:\\ \;\;\;\;y \cdot \frac{t}{-z}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 98.1% 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 87.1%

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

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

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

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

    \[\leadsto x + y \cdot \frac{z - t}{z - a} \]
  6. Add Preprocessing

Alternative 14: 60.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+223}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.00000000000000019e223

    1. Initial program 83.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified47.2%

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

    if -4.00000000000000019e223 < t

    1. Initial program 87.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.0%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+223}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.8% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4199999999999999e163

    1. Initial program 89.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.1%

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

    if -1.4199999999999999e163 < a

    1. Initial program 86.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.6%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative67.6%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified67.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+163}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.7% accurate, 11.0× speedup?

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

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

    \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 49.5%

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.2% 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 2024095 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (+ x (/ y (/ (- z a) (- z t))))

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