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

Percentage Accurate: 83.6% → 97.2%
Time: 8.7s
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: 83.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.2% 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 84.0%

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Step-by-step derivation
    1. associate-/l*97.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. Add Preprocessing

Alternative 2: 59.3% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.7999999999999997e88 or 5.29999999999999997e98 < z

    1. Initial program 71.5%

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

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

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

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

    if -3.7999999999999997e88 < z < -2.80000000000000007e-222

    1. Initial program 83.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 x around 0 83.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity94.7%

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

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

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

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

    if -2.80000000000000007e-222 < z < 9.9999999999999997e-73

    1. Initial program 94.1%

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

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

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

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

    if 9.9999999999999997e-73 < z < 5.29999999999999997e98

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+88}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-222}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 10^{-72}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+98}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 60.4% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.6000000000000006e88 or 2.1000000000000001e-47 < z

    1. Initial program 77.7%

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

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

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

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

    if -6.6000000000000006e88 < z < -1.02e-224

    1. Initial program 83.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 x around 0 83.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity94.7%

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

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

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

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

    if -1.02e-224 < z < 2.1000000000000001e-47

    1. Initial program 94.4%

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

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

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

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

Alternative 4: 76.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{+19} \lor \neg \left(z \leq 1.2 \cdot 10^{-45}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3e19 or 1.19999999999999995e-45 < z

    1. Initial program 78.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 0 64.4%

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

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

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

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

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

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

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

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

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

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

    if -5.3e19 < z < 1.19999999999999995e-45

    1. Initial program 90.1%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
    8. Step-by-step derivation
      1. clear-num82.6%

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

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

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

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

Alternative 5: 76.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+20} \lor \neg \left(z \leq 1.25 \cdot 10^{-45}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e20 or 1.24999999999999994e-45 < z

    1. Initial program 78.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 0 64.4%

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

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

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

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

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

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

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

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

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

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

    if -1.15e20 < z < 1.24999999999999994e-45

    1. Initial program 90.1%

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

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

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

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

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

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

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

Alternative 6: 74.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+88} \lor \neg \left(z \leq 1.7 \cdot 10^{-41}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6000000000000002e88 or 1.6999999999999999e-41 < z

    1. Initial program 77.3%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 t around 0 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6000000000000002e88 < z < 1.6999999999999999e-41

    1. Initial program 89.3%

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

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

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

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

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

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

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

Alternative 7: 69.9% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.04999999999999994e-25 or 2.05000000000000006e-60 < z

    1. Initial program 77.8%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-/l*99.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 t around 0 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.04999999999999994e-25 < z < 2.05000000000000006e-60

    1. Initial program 93.4%

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

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

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

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

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

Alternative 8: 60.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.99999999999999984e88 or 2.1000000000000001e-47 < z

    1. Initial program 77.7%

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

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

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

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

    if -3.99999999999999984e88 < z < 2.1000000000000001e-47

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000017e88 or 1.0999999999999999e-50 < z

    1. Initial program 77.7%

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

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

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

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

    if -4.40000000000000017e88 < z < 1.0999999999999999e-50

    1. Initial program 89.1%

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

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

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

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

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

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

Alternative 10: 36.0% accurate, 9.0× speedup?

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

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

    \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  2. Step-by-step derivation
    1. associate-/l*97.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 35.6%

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

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

  :alt
  (! :herbie-platform default (/ x (/ (- t z) (- y z))))

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