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

Percentage Accurate: 84.1% → 98.4%
Time: 8.4s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 84.1% 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: 98.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq -5 \cdot 10^{-318}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (* x (- y z)) (- t z))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 -5e-318)))
     (* x (/ (- y z) (- t z)))
     t_1)))
double code(double x, double y, double z, double t) {
	double t_1 = (x * (y - z)) / (t - z);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= -5e-318)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (x * (y - z)) / (t - z);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= -5e-318)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x * (y - z)) / (t - z)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= -5e-318):
		tmp = x * ((y - z) / (t - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x * Float64(y - z)) / Float64(t - z))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= -5e-318))
		tmp = Float64(x * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x * (y - z)) / (t - z);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= -5e-318)))
		tmp = x * ((y - z) / (t - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, -5e-318]], $MachinePrecision]], N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq -5 \cdot 10^{-318}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -inf.0 or -4.9999987e-318 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 74.3%

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

    if -inf.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -4.9999987e-318

    1. Initial program 99.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.7%

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

Alternative 2: 74.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{z - y}{z}\\ \mathbf{if}\;z \leq -1550000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-40}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-51}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- z y) z))))
   (if (<= z -1550000000.0)
     t_1
     (if (<= z -1.5e-40)
       (* x (/ (- y z) t))
       (if (<= z -5.8e-51) x (if (<= z 8.8e+45) (* y (/ x (- t z))) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((z - y) / z);
	double tmp;
	if (z <= -1550000000.0) {
		tmp = t_1;
	} else if (z <= -1.5e-40) {
		tmp = x * ((y - z) / t);
	} else if (z <= -5.8e-51) {
		tmp = x;
	} else if (z <= 8.8e+45) {
		tmp = y * (x / (t - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((z - y) / z)
    if (z <= (-1550000000.0d0)) then
        tmp = t_1
    else if (z <= (-1.5d-40)) then
        tmp = x * ((y - z) / t)
    else if (z <= (-5.8d-51)) then
        tmp = x
    else if (z <= 8.8d+45) then
        tmp = y * (x / (t - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((z - y) / z);
	double tmp;
	if (z <= -1550000000.0) {
		tmp = t_1;
	} else if (z <= -1.5e-40) {
		tmp = x * ((y - z) / t);
	} else if (z <= -5.8e-51) {
		tmp = x;
	} else if (z <= 8.8e+45) {
		tmp = y * (x / (t - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((z - y) / z)
	tmp = 0
	if z <= -1550000000.0:
		tmp = t_1
	elif z <= -1.5e-40:
		tmp = x * ((y - z) / t)
	elif z <= -5.8e-51:
		tmp = x
	elif z <= 8.8e+45:
		tmp = y * (x / (t - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (z <= -1550000000.0)
		tmp = t_1;
	elseif (z <= -1.5e-40)
		tmp = Float64(x * Float64(Float64(y - z) / t));
	elseif (z <= -5.8e-51)
		tmp = x;
	elseif (z <= 8.8e+45)
		tmp = Float64(y * Float64(x / Float64(t - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((z - y) / z);
	tmp = 0.0;
	if (z <= -1550000000.0)
		tmp = t_1;
	elseif (z <= -1.5e-40)
		tmp = x * ((y - z) / t);
	elseif (z <= -5.8e-51)
		tmp = x;
	elseif (z <= 8.8e+45)
		tmp = y * (x / (t - z));
	else
		tmp = t_1;
	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, -1550000000.0], t$95$1, If[LessEqual[z, -1.5e-40], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e-51], x, If[LessEqual[z, 8.8e+45], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-51}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.55e9 or 8.8000000000000001e45 < z

    1. Initial program 72.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 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e9 < z < -1.5000000000000001e-40

    1. Initial program 99.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 inf 64.9%

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

    if -1.5000000000000001e-40 < z < -5.79999999999999945e-51

    1. Initial program 100.0%

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

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

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

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

    if -5.79999999999999945e-51 < z < 8.8000000000000001e45

    1. Initial program 88.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1550000000:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-40}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-51}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - y}{z}\\ \end{array} \]

Alternative 3: 74.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-44} \lor \neg \left(y \leq 3.3 \cdot 10^{-51}\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.00000000000000039e-44 or 3.29999999999999973e-51 < y

    1. Initial program 79.5%

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

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

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

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

    if -5.00000000000000039e-44 < y < 3.29999999999999973e-51

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 70.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.49999999999999989e83 or 1.2e106 < z

    1. Initial program 66.8%

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

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

    if -7.49999999999999989e83 < z < 1.2e106

    1. Initial program 90.3%

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

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

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

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

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

Alternative 5: 74.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.50000000000000002e-43

    1. Initial program 77.8%

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

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

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

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

    if -1.50000000000000002e-43 < y < 1.6e-51

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e-51 < y

    1. Initial program 81.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-51}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \end{array} \]

Alternative 6: 61.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{-51}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6e-51 or 5.2000000000000004e69 < z

    1. Initial program 75.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 z around inf 60.2%

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

    if -5.6e-51 < z < 5.2000000000000004e69

    1. Initial program 88.9%

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

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

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

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

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

Alternative 7: 61.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-51}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.79999999999999945e-51 or 3.2999999999999999e69 < z

    1. Initial program 75.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 z around inf 60.2%

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

    if -5.79999999999999945e-51 < z < 3.2999999999999999e69

    1. Initial program 88.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-51}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+69}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 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 82.5%

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

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

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

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

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

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

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

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

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

Alternative 10: 36.2% accurate, 9.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification33.8%

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