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

Percentage Accurate: 84.6% → 97.0%
Time: 17.2s
Alternatives: 10
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 10 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.6% 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} \\ 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 86.2%

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

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

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

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

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

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

Alternative 2: 70.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{x}{z}\\ t_2 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 6.2:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* y (/ x z)))) (t_2 (* x (/ (- y z) t))))
   (if (<= t -5.8e+72)
     t_2
     (if (<= t -3.8e-18)
       t_1
       (if (<= t -6.4e-81)
         t_2
         (if (<= t -3.5e-107)
           t_1
           (if (<= t -1.15e-144)
             (* x (/ y (- t z)))
             (if (<= t 6.2) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_2;
	} else if (t <= -3.8e-18) {
		tmp = t_1;
	} else if (t <= -6.4e-81) {
		tmp = t_2;
	} else if (t <= -3.5e-107) {
		tmp = t_1;
	} else if (t <= -1.15e-144) {
		tmp = x * (y / (t - z));
	} else if (t <= 6.2) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * (x / z))
    t_2 = x * ((y - z) / t)
    if (t <= (-5.8d+72)) then
        tmp = t_2
    else if (t <= (-3.8d-18)) then
        tmp = t_1
    else if (t <= (-6.4d-81)) then
        tmp = t_2
    else if (t <= (-3.5d-107)) then
        tmp = t_1
    else if (t <= (-1.15d-144)) then
        tmp = x * (y / (t - z))
    else if (t <= 6.2d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_2;
	} else if (t <= -3.8e-18) {
		tmp = t_1;
	} else if (t <= -6.4e-81) {
		tmp = t_2;
	} else if (t <= -3.5e-107) {
		tmp = t_1;
	} else if (t <= -1.15e-144) {
		tmp = x * (y / (t - z));
	} else if (t <= 6.2) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (y * (x / z))
	t_2 = x * ((y - z) / t)
	tmp = 0
	if t <= -5.8e+72:
		tmp = t_2
	elif t <= -3.8e-18:
		tmp = t_1
	elif t <= -6.4e-81:
		tmp = t_2
	elif t <= -3.5e-107:
		tmp = t_1
	elif t <= -1.15e-144:
		tmp = x * (y / (t - z))
	elif t <= 6.2:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(y * Float64(x / z)))
	t_2 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (t <= -5.8e+72)
		tmp = t_2;
	elseif (t <= -3.8e-18)
		tmp = t_1;
	elseif (t <= -6.4e-81)
		tmp = t_2;
	elseif (t <= -3.5e-107)
		tmp = t_1;
	elseif (t <= -1.15e-144)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (t <= 6.2)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (y * (x / z));
	t_2 = x * ((y - z) / t);
	tmp = 0.0;
	if (t <= -5.8e+72)
		tmp = t_2;
	elseif (t <= -3.8e-18)
		tmp = t_1;
	elseif (t <= -6.4e-81)
		tmp = t_2;
	elseif (t <= -3.5e-107)
		tmp = t_1;
	elseif (t <= -1.15e-144)
		tmp = x * (y / (t - z));
	elseif (t <= 6.2)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e+72], t$95$2, If[LessEqual[t, -3.8e-18], t$95$1, If[LessEqual[t, -6.4e-81], t$95$2, If[LessEqual[t, -3.5e-107], t$95$1, If[LessEqual[t, -1.15e-144], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -6.4 \cdot 10^{-81}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 6.2:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.80000000000000034e72 or -3.7999999999999998e-18 < t < -6.4e-81 or 6.20000000000000018 < t

    1. Initial program 85.7%

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

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

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

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

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

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

    if -5.80000000000000034e72 < t < -3.7999999999999998e-18 or -6.4e-81 < t < -3.49999999999999985e-107 or -1.15e-144 < t < 6.20000000000000018

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999985e-107 < t < -1.15e-144

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-107}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 6.2:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 70.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{x}{z}\\ t_2 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;t \leq -2.65 \cdot 10^{+73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-147}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 3.7:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* y (/ x z)))) (t_2 (* x (/ (- y z) t))))
   (if (<= t -2.65e+73)
     t_2
     (if (<= t -2.4e-18)
       t_1
       (if (<= t -5.8e-81)
         (/ x (/ t (- y z)))
         (if (<= t -2.6e-107)
           t_1
           (if (<= t -7.4e-147)
             (* x (/ y (- t z)))
             (if (<= t 3.7) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -2.65e+73) {
		tmp = t_2;
	} else if (t <= -2.4e-18) {
		tmp = t_1;
	} else if (t <= -5.8e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -2.6e-107) {
		tmp = t_1;
	} else if (t <= -7.4e-147) {
		tmp = x * (y / (t - z));
	} else if (t <= 3.7) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * (x / z))
    t_2 = x * ((y - z) / t)
    if (t <= (-2.65d+73)) then
        tmp = t_2
    else if (t <= (-2.4d-18)) then
        tmp = t_1
    else if (t <= (-5.8d-81)) then
        tmp = x / (t / (y - z))
    else if (t <= (-2.6d-107)) then
        tmp = t_1
    else if (t <= (-7.4d-147)) then
        tmp = x * (y / (t - z))
    else if (t <= 3.7d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -2.65e+73) {
		tmp = t_2;
	} else if (t <= -2.4e-18) {
		tmp = t_1;
	} else if (t <= -5.8e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -2.6e-107) {
		tmp = t_1;
	} else if (t <= -7.4e-147) {
		tmp = x * (y / (t - z));
	} else if (t <= 3.7) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (y * (x / z))
	t_2 = x * ((y - z) / t)
	tmp = 0
	if t <= -2.65e+73:
		tmp = t_2
	elif t <= -2.4e-18:
		tmp = t_1
	elif t <= -5.8e-81:
		tmp = x / (t / (y - z))
	elif t <= -2.6e-107:
		tmp = t_1
	elif t <= -7.4e-147:
		tmp = x * (y / (t - z))
	elif t <= 3.7:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(y * Float64(x / z)))
	t_2 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (t <= -2.65e+73)
		tmp = t_2;
	elseif (t <= -2.4e-18)
		tmp = t_1;
	elseif (t <= -5.8e-81)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (t <= -2.6e-107)
		tmp = t_1;
	elseif (t <= -7.4e-147)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (t <= 3.7)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (y * (x / z));
	t_2 = x * ((y - z) / t);
	tmp = 0.0;
	if (t <= -2.65e+73)
		tmp = t_2;
	elseif (t <= -2.4e-18)
		tmp = t_1;
	elseif (t <= -5.8e-81)
		tmp = x / (t / (y - z));
	elseif (t <= -2.6e-107)
		tmp = t_1;
	elseif (t <= -7.4e-147)
		tmp = x * (y / (t - z));
	elseif (t <= 3.7)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e+73], t$95$2, If[LessEqual[t, -2.4e-18], t$95$1, If[LessEqual[t, -5.8e-81], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e-107], t$95$1, If[LessEqual[t, -7.4e-147], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.7:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.64999999999999998e73 or 3.7000000000000002 < t

    1. Initial program 84.2%

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

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

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

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

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

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

    if -2.64999999999999998e73 < t < -2.39999999999999994e-18 or -5.79999999999999978e-81 < t < -2.6000000000000001e-107 or -7.40000000000000039e-147 < t < 3.7000000000000002

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.39999999999999994e-18 < t < -5.79999999999999978e-81

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-107 < t < -7.40000000000000039e-147

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-107}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-147}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;t \leq 3.7:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 70.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{x}{z}\\ t_2 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-144}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;t \leq 1.2:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (* y (/ x z)))) (t_2 (* x (/ (- y z) t))))
   (if (<= t -5.5e+72)
     t_2
     (if (<= t -1.06e-17)
       t_1
       (if (<= t -6.4e-81)
         (/ x (/ t (- y z)))
         (if (<= t -4.1e-107)
           t_1
           (if (<= t -1.18e-144)
             (/ x (/ (- t z) y))
             (if (<= t 1.2) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -5.5e+72) {
		tmp = t_2;
	} else if (t <= -1.06e-17) {
		tmp = t_1;
	} else if (t <= -6.4e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -4.1e-107) {
		tmp = t_1;
	} else if (t <= -1.18e-144) {
		tmp = x / ((t - z) / y);
	} else if (t <= 1.2) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * (x / z))
    t_2 = x * ((y - z) / t)
    if (t <= (-5.5d+72)) then
        tmp = t_2
    else if (t <= (-1.06d-17)) then
        tmp = t_1
    else if (t <= (-6.4d-81)) then
        tmp = x / (t / (y - z))
    else if (t <= (-4.1d-107)) then
        tmp = t_1
    else if (t <= (-1.18d-144)) then
        tmp = x / ((t - z) / y)
    else if (t <= 1.2d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (y * (x / z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (t <= -5.5e+72) {
		tmp = t_2;
	} else if (t <= -1.06e-17) {
		tmp = t_1;
	} else if (t <= -6.4e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -4.1e-107) {
		tmp = t_1;
	} else if (t <= -1.18e-144) {
		tmp = x / ((t - z) / y);
	} else if (t <= 1.2) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (y * (x / z))
	t_2 = x * ((y - z) / t)
	tmp = 0
	if t <= -5.5e+72:
		tmp = t_2
	elif t <= -1.06e-17:
		tmp = t_1
	elif t <= -6.4e-81:
		tmp = x / (t / (y - z))
	elif t <= -4.1e-107:
		tmp = t_1
	elif t <= -1.18e-144:
		tmp = x / ((t - z) / y)
	elif t <= 1.2:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(y * Float64(x / z)))
	t_2 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (t <= -5.5e+72)
		tmp = t_2;
	elseif (t <= -1.06e-17)
		tmp = t_1;
	elseif (t <= -6.4e-81)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (t <= -4.1e-107)
		tmp = t_1;
	elseif (t <= -1.18e-144)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	elseif (t <= 1.2)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x - (y * (x / z));
	t_2 = x * ((y - z) / t);
	tmp = 0.0;
	if (t <= -5.5e+72)
		tmp = t_2;
	elseif (t <= -1.06e-17)
		tmp = t_1;
	elseif (t <= -6.4e-81)
		tmp = x / (t / (y - z));
	elseif (t <= -4.1e-107)
		tmp = t_1;
	elseif (t <= -1.18e-144)
		tmp = x / ((t - z) / y);
	elseif (t <= 1.2)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+72], t$95$2, If[LessEqual[t, -1.06e-17], t$95$1, If[LessEqual[t, -6.4e-81], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.1e-107], t$95$1, If[LessEqual[t, -1.18e-144], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.06 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.2:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.5e72 or 1.19999999999999996 < t

    1. Initial program 84.2%

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

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

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

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

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

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

    if -5.5e72 < t < -1.06000000000000006e-17 or -6.4e-81 < t < -4.0999999999999999e-107 or -1.18e-144 < t < 1.19999999999999996

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06000000000000006e-17 < t < -6.4e-81

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -4.0999999999999999e-107 < t < -1.18e-144

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{-17}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-107}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-144}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;t \leq 1.2:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 71.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - z}{t}\\ t_2 := x - \frac{x}{\frac{z}{y}}\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-17}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-161}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- y z) t))) (t_2 (- x (/ x (/ z y)))))
   (if (<= t -5.8e+72)
     t_1
     (if (<= t -1.35e-17)
       (- x (* y (/ x z)))
       (if (<= t -5.2e-81)
         (/ x (/ t (- y z)))
         (if (<= t -2.75e-110)
           t_2
           (if (<= t -1.35e-161)
             (/ (* x y) (- t z))
             (if (<= t 4.6e-5) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double t_2 = x - (x / (z / y));
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_1;
	} else if (t <= -1.35e-17) {
		tmp = x - (y * (x / z));
	} else if (t <= -5.2e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -2.75e-110) {
		tmp = t_2;
	} else if (t <= -1.35e-161) {
		tmp = (x * y) / (t - z);
	} else if (t <= 4.6e-5) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - z) / t)
    t_2 = x - (x / (z / y))
    if (t <= (-5.8d+72)) then
        tmp = t_1
    else if (t <= (-1.35d-17)) then
        tmp = x - (y * (x / z))
    else if (t <= (-5.2d-81)) then
        tmp = x / (t / (y - z))
    else if (t <= (-2.75d-110)) then
        tmp = t_2
    else if (t <= (-1.35d-161)) then
        tmp = (x * y) / (t - z)
    else if (t <= 4.6d-5) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((y - z) / t);
	double t_2 = x - (x / (z / y));
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_1;
	} else if (t <= -1.35e-17) {
		tmp = x - (y * (x / z));
	} else if (t <= -5.2e-81) {
		tmp = x / (t / (y - z));
	} else if (t <= -2.75e-110) {
		tmp = t_2;
	} else if (t <= -1.35e-161) {
		tmp = (x * y) / (t - z);
	} else if (t <= 4.6e-5) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y - z) / t)
	t_2 = x - (x / (z / y))
	tmp = 0
	if t <= -5.8e+72:
		tmp = t_1
	elif t <= -1.35e-17:
		tmp = x - (y * (x / z))
	elif t <= -5.2e-81:
		tmp = x / (t / (y - z))
	elif t <= -2.75e-110:
		tmp = t_2
	elif t <= -1.35e-161:
		tmp = (x * y) / (t - z)
	elif t <= 4.6e-5:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y - z) / t))
	t_2 = Float64(x - Float64(x / Float64(z / y)))
	tmp = 0.0
	if (t <= -5.8e+72)
		tmp = t_1;
	elseif (t <= -1.35e-17)
		tmp = Float64(x - Float64(y * Float64(x / z)));
	elseif (t <= -5.2e-81)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif (t <= -2.75e-110)
		tmp = t_2;
	elseif (t <= -1.35e-161)
		tmp = Float64(Float64(x * y) / Float64(t - z));
	elseif (t <= 4.6e-5)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y - z) / t);
	t_2 = x - (x / (z / y));
	tmp = 0.0;
	if (t <= -5.8e+72)
		tmp = t_1;
	elseif (t <= -1.35e-17)
		tmp = x - (y * (x / z));
	elseif (t <= -5.2e-81)
		tmp = x / (t / (y - z));
	elseif (t <= -2.75e-110)
		tmp = t_2;
	elseif (t <= -1.35e-161)
		tmp = (x * y) / (t - z);
	elseif (t <= 4.6e-5)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e+72], t$95$1, If[LessEqual[t, -1.35e-17], N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-81], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.75e-110], t$95$2, If[LessEqual[t, -1.35e-161], N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-5], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq -2.75 \cdot 10^{-110}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-5}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.80000000000000034e72 or 4.6e-5 < t

    1. Initial program 84.2%

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

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

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

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

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

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

    if -5.80000000000000034e72 < t < -1.3500000000000001e-17

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3500000000000001e-17 < t < -5.1999999999999998e-81

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -5.1999999999999998e-81 < t < -2.7499999999999999e-110 or -1.35e-161 < t < 4.6e-5

    1. Initial program 87.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative97.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{z}{y - z}}} \]
    7. Simplified86.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{\frac{z}{y}}} \]
    12. Applied egg-rr86.3%

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

    if -2.7499999999999999e-110 < t < -1.35e-161

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative90.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-17}:\\ \;\;\;\;x - y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-110}:\\ \;\;\;\;x - \frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-161}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-5}:\\ \;\;\;\;x - \frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 61.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{+46}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 850000000:\\
\;\;\;\;x \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8500000000000001e143 or -2.1e95 < z < -1.6999999999999999e46 or 8.5e8 < z

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative100.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 z around inf 64.0%

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

    if -1.8500000000000001e143 < z < -2.1e95

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e46 < z < 8.5e8

    1. Initial program 93.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(-\frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 850000000:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.50000000000000019e24 or 0.0275000000000000001 < y

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

    if -4.50000000000000019e24 < y < 0.0275000000000000001

    1. Initial program 88.6%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative98.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. Taylor expanded in y around 0 80.6%

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

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

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

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

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

Alternative 8: 68.9% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000001e165 or 8.2000000000000003e65 < z

    1. Initial program 70.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative100.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 z around inf 69.9%

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

    if -8.5000000000000001e165 < z < 8.2000000000000003e65

    1. Initial program 92.6%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative96.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 70.6%

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

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

Alternative 9: 62.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 4800000000:\\
\;\;\;\;x \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5000000000000001e46 or 4.8e9 < z

    1. Initial program 76.5%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 59.3%

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

    if -4.5000000000000001e46 < z < 4.8e9

    1. Initial program 93.9%

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

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

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

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

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

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

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

Alternative 10: 34.9% 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 86.2%

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification31.7%

    \[\leadsto x \]
  7. 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 2024024 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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