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

Percentage Accurate: 84.3% → 97.0%
Time: 8.6s
Alternatives: 17
Speedup: 1.0×

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 17 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.3% 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: 97.0% 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}
Derivation
  1. Initial program 82.7%

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

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

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num97.9%

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
  6. Applied egg-rr98.2%

    \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
  7. Add Preprocessing

Alternative 2: 74.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+25}:\\ \;\;\;\;x - x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-118}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-227}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-16}:\\ \;\;\;\;\frac{x \cdot \left(z - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -3.9e+25)
   (- x (* x (/ y z)))
   (if (<= z -3.3e-118)
     (* x (/ y (- t z)))
     (if (<= z -1.3e-227)
       (/ (* x (- y z)) t)
       (if (<= z 7.2e-53)
         (/ x (/ t (- y z)))
         (if (<= z 1.6e-16) (/ (* x (- z y)) z) (* x (/ z (- z t)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.9e+25) {
		tmp = x - (x * (y / z));
	} else if (z <= -3.3e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -1.3e-227) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 7.2e-53) {
		tmp = x / (t / (y - z));
	} else if (z <= 1.6e-16) {
		tmp = (x * (z - y)) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	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 <= (-3.9d+25)) then
        tmp = x - (x * (y / z))
    else if (z <= (-3.3d-118)) then
        tmp = x * (y / (t - z))
    else if (z <= (-1.3d-227)) then
        tmp = (x * (y - z)) / t
    else if (z <= 7.2d-53) then
        tmp = x / (t / (y - z))
    else if (z <= 1.6d-16) then
        tmp = (x * (z - y)) / z
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.9e+25) {
		tmp = x - (x * (y / z));
	} else if (z <= -3.3e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -1.3e-227) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 7.2e-53) {
		tmp = x / (t / (y - z));
	} else if (z <= 1.6e-16) {
		tmp = (x * (z - y)) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -3.9e+25:
		tmp = x - (x * (y / z))
	elif z <= -3.3e-118:
		tmp = x * (y / (t - z))
	elif z <= -1.3e-227:
		tmp = (x * (y - z)) / t
	elif z <= 7.2e-53:
		tmp = x / (t / (y - z))
	elif z <= 1.6e-16:
		tmp = (x * (z - y)) / z
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -3.9e+25)
		tmp = Float64(x - Float64(x * Float64(y / z)));
	elseif (z <= -3.3e-118)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (z <= -1.3e-227)
		tmp = Float64(Float64(x * Float64(y - z)) / t);
	elseif (z <= 7.2e-53)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (z <= 1.6e-16)
		tmp = Float64(Float64(x * Float64(z - y)) / z);
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -3.9e+25)
		tmp = x - (x * (y / z));
	elseif (z <= -3.3e-118)
		tmp = x * (y / (t - z));
	elseif (z <= -1.3e-227)
		tmp = (x * (y - z)) / t;
	elseif (z <= 7.2e-53)
		tmp = x / (t / (y - z));
	elseif (z <= 1.6e-16)
		tmp = (x * (z - y)) / z;
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.9e+25], N[(x - N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-118], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-227], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 7.2e-53], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-16], N[(N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.9000000000000002e25

    1. Initial program 61.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 50.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg82.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub082.9%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-82.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub082.9%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses82.9%

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(-\frac{y}{z}\right)\right)} \]
      2. distribute-rgt-in82.9%

        \[\leadsto \color{blue}{1 \cdot x + \left(-\frac{y}{z}\right) \cdot x} \]
      3. *-un-lft-identity82.9%

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

        \[\leadsto x + \color{blue}{\frac{y}{-z}} \cdot x \]
    9. Applied egg-rr82.9%

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

    if -3.9000000000000002e25 < z < -3.3e-118

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 70.1%

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

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

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

    if -3.3e-118 < z < -1.30000000000000006e-227

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 94.8%

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

    if -1.30000000000000006e-227 < z < 7.1999999999999998e-53

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.1%

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

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

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

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

    if 7.1999999999999998e-53 < z < 1.60000000000000011e-16

    1. Initial program 100.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg100.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg100.0%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg100.0%

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

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

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

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

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

    if 1.60000000000000011e-16 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+25}:\\ \;\;\;\;x - x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-118}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-227}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-16}:\\ \;\;\;\;\frac{x \cdot \left(z - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+25}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-118}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-54}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{x \cdot \left(z - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -7.6e+25)
   (* x (- 1.0 (/ y z)))
   (if (<= z -1.3e-118)
     (* x (/ y (- t z)))
     (if (<= z -1.75e-236)
       (/ (* x (- y z)) t)
       (if (<= z 2.6e-54)
         (/ x (/ t (- y z)))
         (if (<= z 2.1e-17) (/ (* x (- z y)) z) (* x (/ z (- z t)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -7.6e+25) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= -1.3e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -1.75e-236) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 2.6e-54) {
		tmp = x / (t / (y - z));
	} else if (z <= 2.1e-17) {
		tmp = (x * (z - y)) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	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 <= (-7.6d+25)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= (-1.3d-118)) then
        tmp = x * (y / (t - z))
    else if (z <= (-1.75d-236)) then
        tmp = (x * (y - z)) / t
    else if (z <= 2.6d-54) then
        tmp = x / (t / (y - z))
    else if (z <= 2.1d-17) then
        tmp = (x * (z - y)) / z
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -7.6e+25) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= -1.3e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -1.75e-236) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 2.6e-54) {
		tmp = x / (t / (y - z));
	} else if (z <= 2.1e-17) {
		tmp = (x * (z - y)) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -7.6e+25:
		tmp = x * (1.0 - (y / z))
	elif z <= -1.3e-118:
		tmp = x * (y / (t - z))
	elif z <= -1.75e-236:
		tmp = (x * (y - z)) / t
	elif z <= 2.6e-54:
		tmp = x / (t / (y - z))
	elif z <= 2.1e-17:
		tmp = (x * (z - y)) / z
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -7.6e+25)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= -1.3e-118)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (z <= -1.75e-236)
		tmp = Float64(Float64(x * Float64(y - z)) / t);
	elseif (z <= 2.6e-54)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (z <= 2.1e-17)
		tmp = Float64(Float64(x * Float64(z - y)) / z);
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -7.6e+25)
		tmp = x * (1.0 - (y / z));
	elseif (z <= -1.3e-118)
		tmp = x * (y / (t - z));
	elseif (z <= -1.75e-236)
		tmp = (x * (y - z)) / t;
	elseif (z <= 2.6e-54)
		tmp = x / (t / (y - z));
	elseif (z <= 2.1e-17)
		tmp = (x * (z - y)) / z;
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.6e+25], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-118], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-236], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.6e-54], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-17], N[(N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -7.6000000000000001e25

    1. Initial program 61.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 50.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg82.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub082.9%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-82.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub082.9%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses82.9%

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

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

    if -7.6000000000000001e25 < z < -1.3e-118

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 70.1%

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

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

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

    if -1.3e-118 < z < -1.74999999999999997e-236

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 94.8%

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

    if -1.74999999999999997e-236 < z < 2.60000000000000002e-54

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.1%

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

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

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

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

    if 2.60000000000000002e-54 < z < 2.09999999999999992e-17

    1. Initial program 100.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg100.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg100.0%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg100.0%

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

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

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

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

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

    if 2.09999999999999992e-17 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 4: 74.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-118}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-235}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-56}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-18}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.6e+26)
   (* x (- 1.0 (/ y z)))
   (if (<= z -1.45e-118)
     (* x (/ y (- t z)))
     (if (<= z -8.8e-235)
       (/ (* x (- y z)) t)
       (if (<= z 9e-56)
         (/ x (/ t (- y z)))
         (if (<= z 5e-18) (* (- z y) (/ x z)) (* x (/ z (- z t)))))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+26) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= -1.45e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -8.8e-235) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 9e-56) {
		tmp = x / (t / (y - z));
	} else if (z <= 5e-18) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	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.6d+26)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= (-1.45d-118)) then
        tmp = x * (y / (t - z))
    else if (z <= (-8.8d-235)) then
        tmp = (x * (y - z)) / t
    else if (z <= 9d-56) then
        tmp = x / (t / (y - z))
    else if (z <= 5d-18) then
        tmp = (z - y) * (x / z)
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+26) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= -1.45e-118) {
		tmp = x * (y / (t - z));
	} else if (z <= -8.8e-235) {
		tmp = (x * (y - z)) / t;
	} else if (z <= 9e-56) {
		tmp = x / (t / (y - z));
	} else if (z <= 5e-18) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.6e+26:
		tmp = x * (1.0 - (y / z))
	elif z <= -1.45e-118:
		tmp = x * (y / (t - z))
	elif z <= -8.8e-235:
		tmp = (x * (y - z)) / t
	elif z <= 9e-56:
		tmp = x / (t / (y - z))
	elif z <= 5e-18:
		tmp = (z - y) * (x / z)
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.6e+26)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= -1.45e-118)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (z <= -8.8e-235)
		tmp = Float64(Float64(x * Float64(y - z)) / t);
	elseif (z <= 9e-56)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (z <= 5e-18)
		tmp = Float64(Float64(z - y) * Float64(x / z));
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.6e+26)
		tmp = x * (1.0 - (y / z));
	elseif (z <= -1.45e-118)
		tmp = x * (y / (t - z));
	elseif (z <= -8.8e-235)
		tmp = (x * (y - z)) / t;
	elseif (z <= 9e-56)
		tmp = x / (t / (y - z));
	elseif (z <= 5e-18)
		tmp = (z - y) * (x / z);
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e+26], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e-118], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.8e-235], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 9e-56], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-18], N[(N[(z - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.60000000000000014e26

    1. Initial program 61.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 50.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg82.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub082.9%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-82.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub082.9%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses82.9%

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

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

    if -1.60000000000000014e26 < z < -1.4499999999999999e-118

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 70.1%

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

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

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

    if -1.4499999999999999e-118 < z < -8.79999999999999935e-235

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 94.8%

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

    if -8.79999999999999935e-235 < z < 9.0000000000000001e-56

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.1%

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

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

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

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

    if 9.0000000000000001e-56 < z < 5.00000000000000036e-18

    1. Initial program 100.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg100.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg100.0%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg100.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - y\right) \cdot \frac{x}{z}} \]
    7. Applied egg-rr90.0%

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

    if 5.00000000000000036e-18 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 5: 74.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-19}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.05e+23)
   (* x (- 1.0 (/ y z)))
   (if (<= z 6.2e-53)
     (/ x (/ t (- y z)))
     (if (<= z 2e-19) (* (- z y) (/ x z)) (* x (/ z (- z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 6.2e-53) {
		tmp = x / (t / (y - z));
	} else if (z <= 2e-19) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	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.05d+23)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= 6.2d-53) then
        tmp = x / (t / (y - z))
    else if (z <= 2d-19) then
        tmp = (z - y) * (x / z)
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 6.2e-53) {
		tmp = x / (t / (y - z));
	} else if (z <= 2e-19) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.05e+23:
		tmp = x * (1.0 - (y / z))
	elif z <= 6.2e-53:
		tmp = x / (t / (y - z))
	elif z <= 2e-19:
		tmp = (z - y) * (x / z)
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.05e+23)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= 6.2e-53)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (z <= 2e-19)
		tmp = Float64(Float64(z - y) * Float64(x / z));
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.05e+23)
		tmp = x * (1.0 - (y / z));
	elseif (z <= 6.2e-53)
		tmp = x / (t / (y - z));
	elseif (z <= 2e-19)
		tmp = (z - y) * (x / z);
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05e+23], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-53], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-19], N[(N[(z - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.0500000000000001e23

    1. Initial program 61.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 51.7%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub083.2%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-83.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.2%

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

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

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

    if -1.0500000000000001e23 < z < 6.20000000000000031e-53

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.5%

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

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

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

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

    if 6.20000000000000031e-53 < z < 2e-19

    1. Initial program 100.0%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg100.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg100.0%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg100.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - y\right) \cdot \frac{x}{z}} \]
    7. Applied egg-rr90.0%

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

    if 2e-19 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 6: 73.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-16}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.2e+23)
   (* x (- 1.0 (/ y z)))
   (if (<= z 3.8e-82)
     (* x (/ (- y z) t))
     (if (<= z 3.1e-16) (* (- z y) (/ x z)) (* x (/ z (- z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 3.8e-82) {
		tmp = x * ((y - z) / t);
	} else if (z <= 3.1e-16) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	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.2d+23)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= 3.8d-82) then
        tmp = x * ((y - z) / t)
    else if (z <= 3.1d-16) then
        tmp = (z - y) * (x / z)
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 3.8e-82) {
		tmp = x * ((y - z) / t);
	} else if (z <= 3.1e-16) {
		tmp = (z - y) * (x / z);
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.2e+23:
		tmp = x * (1.0 - (y / z))
	elif z <= 3.8e-82:
		tmp = x * ((y - z) / t)
	elif z <= 3.1e-16:
		tmp = (z - y) * (x / z)
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.2e+23)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= 3.8e-82)
		tmp = Float64(x * Float64(Float64(y - z) / t));
	elseif (z <= 3.1e-16)
		tmp = Float64(Float64(z - y) * Float64(x / z));
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.2e+23)
		tmp = x * (1.0 - (y / z));
	elseif (z <= 3.8e-82)
		tmp = x * ((y - z) / t);
	elseif (z <= 3.1e-16)
		tmp = (z - y) * (x / z);
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.2e+23], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-82], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-16], N[(N[(z - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.2e23

    1. Initial program 61.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 51.7%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub083.2%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-83.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.2%

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

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

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

    if -1.2e23 < z < 3.8000000000000002e-82

    1. Initial program 92.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.2%

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

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

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

    if 3.8000000000000002e-82 < z < 3.1000000000000001e-16

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z - y\right) \cdot \frac{x}{z}} \]
    7. Applied egg-rr79.6%

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

    if 3.1000000000000001e-16 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 73.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-21}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.55e+23)
   (* x (- 1.0 (/ y z)))
   (if (<= z 7.8e-53)
     (* x (/ (- y z) t))
     (if (<= z 9.5e-21) (/ (* x (- y)) z) (* x (/ z (- z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.55e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 7.8e-53) {
		tmp = x * ((y - z) / t);
	} else if (z <= 9.5e-21) {
		tmp = (x * -y) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	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.55d+23)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= 7.8d-53) then
        tmp = x * ((y - z) / t)
    else if (z <= 9.5d-21) then
        tmp = (x * -y) / z
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.55e+23) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 7.8e-53) {
		tmp = x * ((y - z) / t);
	} else if (z <= 9.5e-21) {
		tmp = (x * -y) / z;
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.55e+23:
		tmp = x * (1.0 - (y / z))
	elif z <= 7.8e-53:
		tmp = x * ((y - z) / t)
	elif z <= 9.5e-21:
		tmp = (x * -y) / z
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.55e+23)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= 7.8e-53)
		tmp = Float64(x * Float64(Float64(y - z) / t));
	elseif (z <= 9.5e-21)
		tmp = Float64(Float64(x * Float64(-y)) / z);
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.55e+23)
		tmp = x * (1.0 - (y / z));
	elseif (z <= 7.8e-53)
		tmp = x * ((y - z) / t);
	elseif (z <= 9.5e-21)
		tmp = (x * -y) / z;
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.55e+23], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e-53], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-21], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.5500000000000001e23

    1. Initial program 61.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 51.7%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub083.2%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-83.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.2%

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

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

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

    if -2.5500000000000001e23 < z < 7.8000000000000004e-53

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 76.7%

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

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

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

    if 7.8000000000000004e-53 < z < 9.4999999999999994e-21

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 100.0%

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in80.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub080.4%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-80.4%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub080.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub80.4%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses80.4%

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

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

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

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

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

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

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

    if 9.4999999999999994e-21 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.55 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-21}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 61.3% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.8000000000000001e24 or 1.08e-16 < z

    1. Initial program 72.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.6%

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

    if -4.8000000000000001e24 < z < 6.20000000000000031e-53

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.5%

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

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

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

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

    if 6.20000000000000031e-53 < z < 1.08e-16

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 100.0%

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in80.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub080.4%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-80.4%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub080.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub80.4%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses80.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-16}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.3% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.0000000000000004e24 or 3.1000000000000001e-16 < z

    1. Initial program 72.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.6%

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

    if -7.0000000000000004e24 < z < 2.20000000000000018e-53

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.5%

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

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

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

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

    if 2.20000000000000018e-53 < z < 3.1000000000000001e-16

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 100.0%

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in80.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub080.4%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-80.4%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub080.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub80.4%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-16}:\\ \;\;\;\;y \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.2% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.50000000000000023e24 or 4.50000000000000013e-19 < z

    1. Initial program 72.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.6%

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

    if -2.50000000000000023e24 < z < 6.99999999999999987e-53

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.5%

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

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

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

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

    if 6.99999999999999987e-53 < z < 4.50000000000000013e-19

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 100.0%

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in80.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub080.4%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-80.4%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub080.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub80.4%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses80.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{-z}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 11: 74.9% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000002e25 or 2.0999999999999999e-79 < z

    1. Initial program 74.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 62.4%

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-81.1%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub81.1%

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

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

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

    if -2.8000000000000002e25 < z < 2.0999999999999999e-79

    1. Initial program 92.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 76.8%

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

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

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

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

Alternative 12: 69.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+23} \lor \neg \left(z \leq 2.9 \cdot 10^{-81}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0500000000000001e23 or 2.89999999999999989e-81 < z

    1. Initial program 74.4%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 62.7%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg81.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub081.2%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-81.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub81.2%

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

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

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

    if -1.0500000000000001e23 < z < 2.89999999999999989e-81

    1. Initial program 92.7%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.4%

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

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

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

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

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

Alternative 13: 75.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+25}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-16}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.75e+25)
   (* x (- 1.0 (/ y z)))
   (if (<= z 1.5e-16) (* x (/ y (- t z))) (* x (/ z (- z t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.75e+25) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 1.5e-16) {
		tmp = x * (y / (t - z));
	} else {
		tmp = x * (z / (z - t));
	}
	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.75d+25)) then
        tmp = x * (1.0d0 - (y / z))
    else if (z <= 1.5d-16) then
        tmp = x * (y / (t - z))
    else
        tmp = x * (z / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.75e+25) {
		tmp = x * (1.0 - (y / z));
	} else if (z <= 1.5e-16) {
		tmp = x * (y / (t - z));
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.75e+25:
		tmp = x * (1.0 - (y / z))
	elif z <= 1.5e-16:
		tmp = x * (y / (t - z))
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.75e+25)
		tmp = Float64(x * Float64(1.0 - Float64(y / z)));
	elseif (z <= 1.5e-16)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	else
		tmp = Float64(x * Float64(z / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.75e+25)
		tmp = x * (1.0 - (y / z));
	elseif (z <= 1.5e-16)
		tmp = x * (y / (t - z));
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.75e+25], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-16], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.75000000000000009e25

    1. Initial program 61.3%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 50.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg82.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub082.9%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-82.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub082.9%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses82.9%

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

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

    if -2.75000000000000009e25 < z < 1.49999999999999997e-16

    1. Initial program 92.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 76.0%

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

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

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

    if 1.49999999999999997e-16 < z

    1. Initial program 81.0%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.2%

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.2%

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

        \[\leadsto \frac{x \cdot z}{\color{blue}{0 - \left(t - z\right)}} \]
      4. associate--r-71.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
    7. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 61.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8000000000000001e24 or 3.99999999999999992e-12 < z

    1. Initial program 71.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 68.6%

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

    if -4.8000000000000001e24 < z < 3.99999999999999992e-12

    1. Initial program 92.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.1%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    6. Applied egg-rr96.7%

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

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 61.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2999999999999999e23 or 2.54999999999999984e-12 < z

    1. Initial program 71.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 68.6%

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

    if -4.2999999999999999e23 < z < 2.54999999999999984e-12

    1. Initial program 92.8%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 60.8%

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{t}} \]
    7. Simplified65.5%

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

Alternative 16: 97.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{y - z}{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(x * Float64(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[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 17: 35.1% 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 82.7%

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

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

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 37.6%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 97.0% 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 2024087 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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