Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.1% → 95.7%
Time: 9.0s
Alternatives: 16
Speedup: 0.7×

Specification

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

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\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: 84.1% accurate, 1.0× speedup?

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

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

Alternative 1: 95.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.89999999999999979e-120

    1. Initial program 80.8%

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

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

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
      2. clear-num96.7%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{t - z}{x}}} \]
      3. un-div-inv97.1%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{t - z}{x}}} \]
    5. Applied egg-rr97.1%

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

    if -5.89999999999999979e-120 < x < 9.1999999999999997e-20

    1. Initial program 95.8%

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

    if 9.1999999999999997e-20 < x

    1. Initial program 71.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.9 \cdot 10^{-120}:\\ \;\;\;\;\frac{y - z}{\frac{t - z}{x}}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-20}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \end{array} \]

Alternative 2: 69.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+17}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.4e17 or 9.5000000000000002e156 < z

    1. Initial program 72.5%

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

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

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

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

    if -4.4e17 < z < 1.1499999999999999e-84

    1. Initial program 92.1%

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

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

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

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

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

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

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

    if 1.1499999999999999e-84 < z < 9.5000000000000002e156

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    7. Step-by-step derivation
      1. frac-2neg63.0%

        \[\leadsto \frac{x}{\color{blue}{\frac{-\left(t - z\right)}{-\left(-z\right)}}} \]
      2. remove-double-neg63.0%

        \[\leadsto \frac{x}{\frac{-\left(t - z\right)}{\color{blue}{z}}} \]
      3. associate-/r/56.3%

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \cdot z \]
      6. remove-double-neg56.3%

        \[\leadsto \frac{x}{\left(-t\right) + \color{blue}{z}} \cdot z \]
    8. Applied egg-rr56.3%

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

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

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

        \[\leadsto z \cdot \frac{x}{\color{blue}{z - t}} \]
    10. Simplified56.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-84}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 70.2% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.31999999999999995e163 or 9.5000000000000002e156 < z

    1. Initial program 66.0%

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

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

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

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

    if -1.31999999999999995e163 < z < 8e19

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

    if 8e19 < z < 9.5000000000000002e156

    1. Initial program 70.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{t - z}} \]
      2. mul-1-neg48.5%

        \[\leadsto \frac{\color{blue}{-x \cdot z}}{t - z} \]
      3. distribute-rgt-neg-out48.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    6. Simplified70.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    7. Step-by-step derivation
      1. frac-2neg70.2%

        \[\leadsto \frac{x}{\color{blue}{\frac{-\left(t - z\right)}{-\left(-z\right)}}} \]
      2. remove-double-neg70.2%

        \[\leadsto \frac{x}{\frac{-\left(t - z\right)}{\color{blue}{z}}} \]
      3. associate-/r/61.2%

        \[\leadsto \color{blue}{\frac{x}{-\left(t - z\right)} \cdot z} \]
      4. sub-neg61.2%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \cdot z \]
      6. remove-double-neg61.2%

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

      \[\leadsto \color{blue}{\frac{x}{\left(-t\right) + z} \cdot z} \]
    9. Step-by-step derivation
      1. *-commutative61.2%

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

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

        \[\leadsto z \cdot \frac{x}{\color{blue}{z - t}} \]
    10. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{+163}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 90.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+139} \lor \neg \left(z \leq 1.35 \cdot 10^{+156}\right):\\
\;\;\;\;\frac{-x}{\frac{z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8999999999999999e139 or 1.35e156 < z

    1. Initial program 67.3%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac93.8%

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

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

    if -2.8999999999999999e139 < z < 1.35e156

    1. Initial program 89.0%

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

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

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

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

Alternative 5: 95.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-120} \lor \neg \left(x \leq 3 \cdot 10^{-20}\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.00000000000000022e-120 or 3.00000000000000029e-20 < x

    1. Initial program 77.2%

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

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

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

    if -6.00000000000000022e-120 < x < 3.00000000000000029e-20

    1. Initial program 95.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-120} \lor \neg \left(x \leq 3 \cdot 10^{-20}\right):\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array} \]

Alternative 6: 75.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-38} \lor \neg \left(z \leq 2.9 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{-x}{\frac{z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.85e-38 or 2.9e20 < z

    1. Initial program 75.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac79.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    6. Simplified79.2%

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

    if -1.85e-38 < z < 2.9e20

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

Alternative 7: 61.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+22}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-46}:\\
\;\;\;\;y \cdot \frac{-x}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7000000000000002e22 or 3.5e20 < z

    1. Initial program 72.4%

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

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

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

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

    if -2.7000000000000002e22 < z < -6.49999999999999966e-46

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. neg-mul-162.9%

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

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

    if -6.49999999999999966e-46 < z < 3.5e20

    1. Initial program 91.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified67.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-46}:\\ \;\;\;\;y \cdot \frac{-x}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 61.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-45}:\\
\;\;\;\;\left(-x\right) \cdot \frac{y}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.26e14 or 3.4e20 < z

    1. Initial program 72.4%

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

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

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

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

    if -1.26e14 < z < -4.1999999999999999e-45

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y}}} \]
      3. distribute-neg-frac63.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y}}} \]
    9. Simplified63.2%

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot \frac{y}{z}} \]
      3. *-commutative63.1%

        \[\leadsto \color{blue}{\left(x \cdot -1\right)} \cdot \frac{y}{z} \]
      4. associate-*r*63.1%

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \frac{y}{z}\right)} \]
      5. *-commutative63.1%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z}\right) \cdot x} \]
      6. mul-1-neg63.1%

        \[\leadsto \color{blue}{\left(-\frac{y}{z}\right)} \cdot x \]
    12. Simplified63.1%

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

    if -4.1999999999999999e-45 < z < 3.4e20

    1. Initial program 91.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified67.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-45}:\\ \;\;\;\;\left(-x\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 61.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -10600000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{-x}{\frac{z}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.06e13 or 3.8e20 < z

    1. Initial program 72.4%

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

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

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

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

    if -1.06e13 < z < -3.20000000000000007e-45

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{z}{y}}} \]
      3. distribute-neg-frac63.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y}}} \]
    9. Simplified63.2%

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

    if -3.20000000000000007e-45 < z < 3.8e20

    1. Initial program 91.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified67.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -10600000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{-x}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 74.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-38} \lor \neg \left(z \leq 3 \cdot 10^{+20}\right):\\
\;\;\;\;x - y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e-38 or 3e20 < z

    1. Initial program 75.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. neg-mul-122.5%

        \[\leadsto y \cdot \frac{\color{blue}{-x}}{z} \]
    6. Simplified58.2%

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

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

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

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

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

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

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

    if -1.4e-38 < z < 3e20

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

Alternative 11: 68.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+21}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5e21 or 5.50000000000000002e31 < z

    1. Initial program 71.4%

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

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

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

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

    if -6.5e21 < z < 5.50000000000000002e31

    1. Initial program 93.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 75.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-38}:\\
\;\;\;\;x - y \cdot \frac{x}{z}\\

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

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


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

    1. Initial program 78.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot x}{z}} \]
      2. neg-mul-125.9%

        \[\leadsto y \cdot \frac{\color{blue}{-x}}{z} \]
    6. Simplified60.4%

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

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

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

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

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

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

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

    if -1.9999999999999999e-38 < z < 3.6e19

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    if 3.6e19 < z

    1. Initial program 70.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{t - z}} \]
      2. mul-1-neg53.5%

        \[\leadsto \frac{\color{blue}{-x \cdot z}}{t - z} \]
      3. distribute-rgt-neg-out53.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    6. Simplified74.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    7. Step-by-step derivation
      1. frac-2neg74.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{-\left(t - z\right)}{-\left(-z\right)}}} \]
      2. div-inv74.4%

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} \cdot \frac{1}{-\left(-z\right)}} \]
      5. remove-double-neg74.4%

        \[\leadsto \frac{x}{\left(\left(-t\right) + \color{blue}{z}\right) \cdot \frac{1}{-\left(-z\right)}} \]
      6. remove-double-neg74.4%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{z - t}}{z}} \]
    10. Simplified74.6%

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

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

Alternative 13: 60.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-38}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e-38 or 2.35e20 < z

    1. Initial program 75.8%

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

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

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

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

    if -1.4e-38 < z < 2.35e20

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

Alternative 14: 61.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.02 \cdot 10^{-38}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.02000000000000007e-38 or 3.2e20 < z

    1. Initial program 75.8%

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

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

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

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

    if -2.02000000000000007e-38 < z < 3.2e20

    1. Initial program 92.0%

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

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

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
      2. clear-num92.0%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{t - z}{x}}} \]
      3. un-div-inv92.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot x} \]
    8. Simplified66.8%

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

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

Alternative 15: 61.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.02 \cdot 10^{-38}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.02000000000000007e-38 or 3.3e20 < z

    1. Initial program 75.8%

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

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

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

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

    if -2.02000000000000007e-38 < z < 3.3e20

    1. Initial program 92.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified66.8%

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

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

Alternative 16: 35.0% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification32.3%

    \[\leadsto x \]

Developer target: 97.2% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023290 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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