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

Percentage Accurate: 84.2% → 96.9%
Time: 9.0s
Alternatives: 13
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 13 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.2% 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*96.0%

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

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

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

Alternative 2: 75.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - y}{z}\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -0.18:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-11} \lor \neg \left(z \leq 135\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- z y) z))))
   (if (<= z -1.55e+44)
     t_1
     (if (<= z -0.18)
       (/ x (/ t (- y z)))
       (if (or (<= z -1.02e-11) (not (<= z 135.0)))
         t_1
         (* x (/ y (- t z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((z - y) / z);
	double tmp;
	if (z <= -1.55e+44) {
		tmp = t_1;
	} else if (z <= -0.18) {
		tmp = x / (t / (y - z));
	} else if ((z <= -1.02e-11) || !(z <= 135.0)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * ((z - y) / z)
    if (z <= (-1.55d+44)) then
        tmp = t_1
    else if (z <= (-0.18d0)) then
        tmp = x / (t / (y - z))
    else if ((z <= (-1.02d-11)) .or. (.not. (z <= 135.0d0))) then
        tmp = t_1
    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 t_1 = x * ((z - y) / z);
	double tmp;
	if (z <= -1.55e+44) {
		tmp = t_1;
	} else if (z <= -0.18) {
		tmp = x / (t / (y - z));
	} else if ((z <= -1.02e-11) || !(z <= 135.0)) {
		tmp = t_1;
	} else {
		tmp = x * (y / (t - z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((z - y) / z)
	tmp = 0
	if z <= -1.55e+44:
		tmp = t_1
	elif z <= -0.18:
		tmp = x / (t / (y - z))
	elif (z <= -1.02e-11) or not (z <= 135.0):
		tmp = t_1
	else:
		tmp = x * (y / (t - z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (z <= -1.55e+44)
		tmp = t_1;
	elseif (z <= -0.18)
		tmp = Float64(x / Float64(t / Float64(y - z)));
	elseif ((z <= -1.02e-11) || !(z <= 135.0))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(y / Float64(t - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((z - y) / z);
	tmp = 0.0;
	if (z <= -1.55e+44)
		tmp = t_1;
	elseif (z <= -0.18)
		tmp = x / (t / (y - z));
	elseif ((z <= -1.02e-11) || ~((z <= 135.0)))
		tmp = t_1;
	else
		tmp = x * (y / (t - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+44], t$95$1, If[LessEqual[z, -0.18], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.02e-11], N[Not[LessEqual[z, 135.0]], $MachinePrecision]], t$95$1, N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{z - y}{z}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -0.18:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\

\mathbf{elif}\;z \leq -1.02 \cdot 10^{-11} \lor \neg \left(z \leq 135\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.54999999999999998e44 or -0.17999999999999999 < z < -1.01999999999999994e-11 or 135 < z

    1. Initial program 78.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y\right) + z}}{\frac{z}{x}} \]
      6. neg-sub060.5%

        \[\leadsto \frac{\color{blue}{\left(-y\right)} + z}{\frac{z}{x}} \]
    6. Simplified60.5%

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

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

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

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

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

    if -1.54999999999999998e44 < z < -0.17999999999999999

    1. Initial program 84.3%

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

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

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

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

    if -1.01999999999999994e-11 < z < 135

    1. Initial program 91.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/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. Taylor expanded in y around inf 77.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -0.18:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-11} \lor \neg \left(z \leq 135\right):\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \]

Alternative 3: 75.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{z - y}{z}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -0.23:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\

\mathbf{elif}\;z \leq -4.1 \cdot 10^{-12} \lor \neg \left(z \leq 0.7\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.54999999999999998e44 or -0.23000000000000001 < z < -4.0999999999999999e-12 or 0.69999999999999996 < z

    1. Initial program 78.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y\right) + z}}{\frac{z}{x}} \]
      6. neg-sub060.5%

        \[\leadsto \frac{\color{blue}{\left(-y\right)} + z}{\frac{z}{x}} \]
    6. Simplified60.5%

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

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

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

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

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

    if -1.54999999999999998e44 < z < -0.23000000000000001

    1. Initial program 84.3%

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

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

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

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

    if -4.0999999999999999e-12 < z < 0.69999999999999996

    1. Initial program 91.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -0.23:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-12} \lor \neg \left(z \leq 0.7\right):\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \end{array} \]

Alternative 4: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{\frac{t - z}{x}}\\
\mathbf{if}\;z \leq -3800000:\\
\;\;\;\;\frac{x}{\frac{z - t}{z}}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-216}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 400:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 80.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-inv99.9%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t - z}{y - z}}} \]
      2. add-cube-cbrt98.1%

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x}\right)}^{2} \cdot \left(\sqrt[3]{x} \cdot \frac{y - z}{t - z}\right)} \]
    6. Taylor expanded in y around 0 71.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    8. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{z - t}}{z}} \]
    12. Simplified85.9%

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

    if -3.8e6 < z < 5.00000000000000021e-216 or 3.30000000000000004e-62 < z < 400

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000021e-216 < z < 3.30000000000000004e-62

    1. Initial program 90.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/96.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. Taylor expanded in t around inf 75.3%

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

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

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

    if 400 < z

    1. Initial program 76.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y\right) + z}}{\frac{z}{x}} \]
      6. neg-sub059.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3800000:\\ \;\;\;\;\frac{x}{\frac{z - t}{z}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-216}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-62}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 400:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \end{array} \]

Alternative 5: 60.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8500000000000001e83 or 1.30000000000000004 < z

    1. Initial program 78.0%

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

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

    if -1.8500000000000001e83 < z < -4.6000000000000002e-105

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6000000000000002e-105 < z < 1.30000000000000004

    1. Initial program 91.8%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/73.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \frac{-x}{z}\\ \mathbf{elif}\;z \leq 1.3:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 75.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+44} \lor \neg \left(z \leq 470\right):\\
\;\;\;\;x \cdot \frac{z - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65000000000000007e44 or 470 < z

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000007e44 < z < 470

    1. Initial program 91.6%

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

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

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

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

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

Alternative 7: 69.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999996e81 or 4800 < z

    1. Initial program 78.0%

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

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

    if -6.4999999999999996e81 < z < 4800

    1. Initial program 91.2%

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

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

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

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

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

Alternative 8: 75.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2300000000:\\ \;\;\;\;\frac{x}{\frac{z - t}{z}}\\ \mathbf{elif}\;z \leq 1.05:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2300000000.0)
   (/ x (/ (- z t) z))
   (if (<= z 1.05) (/ x (/ (- t z) y)) (* x (/ (- z y) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2300000000.0) {
		tmp = x / ((z - t) / z);
	} else if (z <= 1.05) {
		tmp = x / ((t - z) / y);
	} else {
		tmp = x * ((z - 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 <= (-2300000000.0d0)) then
        tmp = x / ((z - t) / z)
    else if (z <= 1.05d0) then
        tmp = x / ((t - z) / y)
    else
        tmp = x * ((z - y) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2300000000.0) {
		tmp = x / ((z - t) / z);
	} else if (z <= 1.05) {
		tmp = x / ((t - z) / y);
	} else {
		tmp = x * ((z - y) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2300000000.0:
		tmp = x / ((z - t) / z)
	elif z <= 1.05:
		tmp = x / ((t - z) / y)
	else:
		tmp = x * ((z - y) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2300000000.0)
		tmp = Float64(x / Float64(Float64(z - t) / z));
	elseif (z <= 1.05)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	else
		tmp = Float64(x * Float64(Float64(z - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2300000000.0)
		tmp = x / ((z - t) / z);
	elseif (z <= 1.05)
		tmp = x / ((t - z) / y);
	else
		tmp = x * ((z - y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2300000000.0], N[(x / N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2300000000:\\
\;\;\;\;\frac{x}{\frac{z - t}{z}}\\

\mathbf{elif}\;z \leq 1.05:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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


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

    1. Initial program 80.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-inv99.9%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t - z}{y - z}}} \]
      2. add-cube-cbrt98.1%

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x}\right)}^{2} \cdot \left(\sqrt[3]{x} \cdot \frac{y - z}{t - z}\right)} \]
    6. Taylor expanded in y around 0 71.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    8. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{z - t}}{z}} \]
    12. Simplified85.9%

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

    if -2.3e9 < z < 1.05000000000000004

    1. Initial program 92.0%

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

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

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

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

    if 1.05000000000000004 < z

    1. Initial program 76.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y\right) + z}}{\frac{z}{x}} \]
      6. neg-sub059.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2300000000:\\ \;\;\;\;\frac{x}{\frac{z - t}{z}}\\ \mathbf{elif}\;z \leq 1.05:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \end{array} \]

Alternative 9: 75.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85:\\
\;\;\;\;\frac{x}{\frac{z - t}{z}}\\

\mathbf{elif}\;z \leq 25:\\
\;\;\;\;\frac{y}{\frac{t - z}{x}}\\

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


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

    1. Initial program 80.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-inv99.9%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{t - z}{y - z}}} \]
      2. add-cube-cbrt98.1%

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x}\right)}^{2} \cdot \left(\sqrt[3]{x} \cdot \frac{y - z}{t - z}\right)} \]
    6. Taylor expanded in y around 0 71.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{-z}}} \]
    8. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{z - t}}{z}} \]
    12. Simplified85.9%

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

    if -1.8500000000000001 < z < 25

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

    if 25 < z

    1. Initial program 76.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y\right) + z}}{\frac{z}{x}} \]
      6. neg-sub059.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85:\\ \;\;\;\;\frac{x}{\frac{z - t}{z}}\\ \mathbf{elif}\;z \leq 25:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \end{array} \]

Alternative 10: 61.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999998e44 or 4200 < z

    1. Initial program 78.0%

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

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

    if -1.54999999999999998e44 < z < 4200

    1. Initial program 91.6%

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

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

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

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

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

Alternative 11: 60.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999998e44 or 290 < z

    1. Initial program 78.0%

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

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

    if -1.54999999999999998e44 < z < 290

    1. Initial program 91.6%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/64.8%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    6. Applied egg-rr64.8%

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

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

Alternative 12: 96.9% 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 85.9%

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

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

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

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

Alternative 13: 35.1% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification35.7%

    \[\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 2023185 
(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)))