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

Percentage Accurate: 84.3% → 96.9%
Time: 9.2s
Alternatives: 9
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 9 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: 96.9% 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 85.9%

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

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

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

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

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

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

Alternative 2: 73.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{-13} \lor \neg \left(z \leq 3.8 \cdot 10^{-100} \lor \neg \left(z \leq 1.65 \cdot 10^{+39}\right) \land z \leq 2.3 \cdot 10^{+73}\right):\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -6.6e-13)
         (not (or (<= z 3.8e-100) (and (not (<= z 1.65e+39)) (<= z 2.3e+73)))))
   (* x (/ z (- z t)))
   (* x (/ (- y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -6.6e-13) || !((z <= 3.8e-100) || (!(z <= 1.65e+39) && (z <= 2.3e+73)))) {
		tmp = x * (z / (z - t));
	} else {
		tmp = x * ((y - 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 <= (-6.6d-13)) .or. (.not. (z <= 3.8d-100) .or. (.not. (z <= 1.65d+39)) .and. (z <= 2.3d+73))) then
        tmp = x * (z / (z - t))
    else
        tmp = x * ((y - z) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -6.6e-13) || !((z <= 3.8e-100) || (!(z <= 1.65e+39) && (z <= 2.3e+73)))) {
		tmp = x * (z / (z - t));
	} else {
		tmp = x * ((y - z) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -6.6e-13) or not ((z <= 3.8e-100) or (not (z <= 1.65e+39) and (z <= 2.3e+73))):
		tmp = x * (z / (z - t))
	else:
		tmp = x * ((y - z) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -6.6e-13) || !((z <= 3.8e-100) || (!(z <= 1.65e+39) && (z <= 2.3e+73))))
		tmp = Float64(x * Float64(z / Float64(z - t)));
	else
		tmp = Float64(x * Float64(Float64(y - z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -6.6e-13) || ~(((z <= 3.8e-100) || (~((z <= 1.65e+39)) && (z <= 2.3e+73)))))
		tmp = x * (z / (z - t));
	else
		tmp = x * ((y - z) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.6e-13], N[Not[Or[LessEqual[z, 3.8e-100], And[N[Not[LessEqual[z, 1.65e+39]], $MachinePrecision], LessEqual[z, 2.3e+73]]]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-13} \lor \neg \left(z \leq 3.8 \cdot 10^{-100} \lor \neg \left(z \leq 1.65 \cdot 10^{+39}\right) \land z \leq 2.3 \cdot 10^{+73}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.6000000000000001e-13 or 3.79999999999999997e-100 < z < 1.6500000000000001e39 or 2.3e73 < z

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000001e-13 < z < 3.79999999999999997e-100 or 1.6500000000000001e39 < z < 2.3e73

    1. Initial program 91.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{-13} \lor \neg \left(z \leq 3.8 \cdot 10^{-100} \lor \neg \left(z \leq 1.65 \cdot 10^{+39}\right) \land z \leq 2.3 \cdot 10^{+73}\right):\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \end{array} \]

Alternative 3: 72.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-13} \lor \neg \left(z \leq 1.95 \cdot 10^{-100}\right) \land \left(z \leq 5.2 \cdot 10^{+39} \lor \neg \left(z \leq 8.5 \cdot 10^{+72}\right)\right):\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.35e-13)
         (and (not (<= z 1.95e-100)) (or (<= z 5.2e+39) (not (<= z 8.5e+72)))))
   (* x (/ z (- z t)))
   (/ x (/ t (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.35e-13) || (!(z <= 1.95e-100) && ((z <= 5.2e+39) || !(z <= 8.5e+72)))) {
		tmp = x * (z / (z - t));
	} else {
		tmp = x / (t / (y - 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.35d-13)) .or. (.not. (z <= 1.95d-100)) .and. (z <= 5.2d+39) .or. (.not. (z <= 8.5d+72))) then
        tmp = x * (z / (z - t))
    else
        tmp = x / (t / (y - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.35e-13) || (!(z <= 1.95e-100) && ((z <= 5.2e+39) || !(z <= 8.5e+72)))) {
		tmp = x * (z / (z - t));
	} else {
		tmp = x / (t / (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.35e-13) or (not (z <= 1.95e-100) and ((z <= 5.2e+39) or not (z <= 8.5e+72))):
		tmp = x * (z / (z - t))
	else:
		tmp = x / (t / (y - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.35e-13) || (!(z <= 1.95e-100) && ((z <= 5.2e+39) || !(z <= 8.5e+72))))
		tmp = Float64(x * Float64(z / Float64(z - t)));
	else
		tmp = Float64(x / Float64(t / Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.35e-13) || (~((z <= 1.95e-100)) && ((z <= 5.2e+39) || ~((z <= 8.5e+72)))))
		tmp = x * (z / (z - t));
	else
		tmp = x / (t / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.35e-13], And[N[Not[LessEqual[z, 1.95e-100]], $MachinePrecision], Or[LessEqual[z, 5.2e+39], N[Not[LessEqual[z, 8.5e+72]], $MachinePrecision]]]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{-13} \lor \neg \left(z \leq 1.95 \cdot 10^{-100}\right) \land \left(z \leq 5.2 \cdot 10^{+39} \lor \neg \left(z \leq 8.5 \cdot 10^{+72}\right)\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3500000000000001e-13 or 1.94999999999999989e-100 < z < 5.2e39 or 8.5000000000000004e72 < z

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3500000000000001e-13 < z < 1.94999999999999989e-100 or 5.2e39 < z < 8.5000000000000004e72

    1. Initial program 91.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-13} \lor \neg \left(z \leq 1.95 \cdot 10^{-100}\right) \land \left(z \leq 5.2 \cdot 10^{+39} \lor \neg \left(z \leq 8.5 \cdot 10^{+72}\right)\right):\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \end{array} \]

Alternative 4: 84.8% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+108}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.8000000000000003e-90 or 2.3500000000000001e-144 < y < 2.6000000000000002e108

    1. Initial program 85.7%

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

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

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

    if -4.8000000000000003e-90 < y < 2.3500000000000001e-144

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000002e108 < y

    1. Initial program 86.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-90}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+108}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \end{array} \]

Alternative 5: 76.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+17} \lor \neg \left(y \leq 8.2 \cdot 10^{-40}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5e17 or 8.19999999999999926e-40 < y

    1. Initial program 88.1%

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

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

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

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

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

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

    if -6.5e17 < y < 8.19999999999999926e-40

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 67.6% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.06e71 or 5.2000000000000004e77 < z

    1. Initial program 77.0%

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

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

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

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

    if -1.06e71 < z < 5.2000000000000004e77

    1. Initial program 91.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 61.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.85e21 or 9.99999999999999983e72 < z

    1. Initial program 77.8%

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

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

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

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

    if -2.85e21 < z < 9.99999999999999983e72

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

Alternative 8: 61.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.7e19 or 2.15000000000000007e73 < z

    1. Initial program 77.8%

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

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

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

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

    if -4.7e19 < z < 2.15000000000000007e73

    1. Initial program 92.0%

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

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

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

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

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

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

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

Alternative 9: 34.6% 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 85.9%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification34.0%

    \[\leadsto x \]

Developer target: 96.9% 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 2023274 
(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)))