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

Percentage Accurate: 84.9% → 97.0%
Time: 8.8s
Alternatives: 11
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 11 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 0.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 95000000000000:\\ \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 95000000000000.0)
    (/ (* x_m (- y z)) (- t z))
    (* (- z y) (/ x_m (- z t))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (x_m <= 95000000000000.0) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (z - y) * (x_m / (z - t));
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x_m <= 95000000000000.0d0) then
        tmp = (x_m * (y - z)) / (t - z)
    else
        tmp = (z - y) * (x_m / (z - t))
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (x_m <= 95000000000000.0) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (z - y) * (x_m / (z - t));
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if x_m <= 95000000000000.0:
		tmp = (x_m * (y - z)) / (t - z)
	else:
		tmp = (z - y) * (x_m / (z - t))
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (x_m <= 95000000000000.0)
		tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(Float64(z - y) * Float64(x_m / Float64(z - t)));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (x_m <= 95000000000000.0)
		tmp = (x_m * (y - z)) / (t - z);
	else
		tmp = (z - y) * (x_m / (z - t));
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[x$95$m, 95000000000000.0], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 95000000000000:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\

\mathbf{else}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 9.5e13

    1. Initial program 86.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing

    if 9.5e13 < x

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative59.7%

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

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

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

Alternative 2: 58.1% accurate, 0.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-52}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-126}:\\ \;\;\;\;\frac{x\_m \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -1.2e-52)
    x_m
    (if (<= z -3e-126)
      (/ (* x_m (- y)) z)
      (if (<= z 1.4e-53) (* y (/ x_m t)) x_m)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e-52) {
		tmp = x_m;
	} else if (z <= -3e-126) {
		tmp = (x_m * -y) / z;
	} else if (z <= 1.4e-53) {
		tmp = y * (x_m / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.2d-52)) then
        tmp = x_m
    else if (z <= (-3d-126)) then
        tmp = (x_m * -y) / z
    else if (z <= 1.4d-53) then
        tmp = y * (x_m / t)
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.2e-52) {
		tmp = x_m;
	} else if (z <= -3e-126) {
		tmp = (x_m * -y) / z;
	} else if (z <= 1.4e-53) {
		tmp = y * (x_m / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if z <= -1.2e-52:
		tmp = x_m
	elif z <= -3e-126:
		tmp = (x_m * -y) / z
	elif z <= 1.4e-53:
		tmp = y * (x_m / t)
	else:
		tmp = x_m
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (z <= -1.2e-52)
		tmp = x_m;
	elseif (z <= -3e-126)
		tmp = Float64(Float64(x_m * Float64(-y)) / z);
	elseif (z <= 1.4e-53)
		tmp = Float64(y * Float64(x_m / t));
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (z <= -1.2e-52)
		tmp = x_m;
	elseif (z <= -3e-126)
		tmp = (x_m * -y) / z;
	elseif (z <= 1.4e-53)
		tmp = y * (x_m / t);
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -1.2e-52], x$95$m, If[LessEqual[z, -3e-126], N[(N[(x$95$m * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.4e-53], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], x$95$m]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-52}:\\
\;\;\;\;x\_m\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-126}:\\
\;\;\;\;\frac{x\_m \cdot \left(-y\right)}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2000000000000001e-52 or 1.39999999999999993e-53 < z

    1. Initial program 71.6%

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

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

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

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

    if -1.2000000000000001e-52 < z < -3.0000000000000002e-126

    1. Initial program 94.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot y}}{z} \]
      3. neg-mul-166.1%

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

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

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

    if -3.0000000000000002e-126 < z < 1.39999999999999993e-53

    1. Initial program 93.2%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
    7. Applied egg-rr78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-126}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.5% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-45} \lor \neg \left(z \leq 3.6\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y}{t - z}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -4.2e-45) (not (<= z 3.6)))
    (* x_m (- 1.0 (/ y z)))
    (/ (* x_m y) (- t z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -4.2e-45) || !(z <= 3.6)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = (x_m * y) / (t - z);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-4.2d-45)) .or. (.not. (z <= 3.6d0))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = (x_m * y) / (t - z)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -4.2e-45) || !(z <= 3.6)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = (x_m * y) / (t - z);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -4.2e-45) or not (z <= 3.6):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = (x_m * y) / (t - z)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -4.2e-45) || !(z <= 3.6))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(Float64(x_m * y) / Float64(t - z));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -4.2e-45) || ~((z <= 3.6)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = (x_m * y) / (t - z);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -4.2e-45], N[Not[LessEqual[z, 3.6]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-45} \lor \neg \left(z \leq 3.6\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


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

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-45 < z < 3.60000000000000009

    1. Initial program 93.8%

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

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

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

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

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

Alternative 4: 75.7% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-9} \lor \neg \left(z \leq 1.7 \cdot 10^{-35}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\frac{t - z}{y}}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -9e-9) (not (<= z 1.7e-35)))
    (* x_m (- 1.0 (/ y z)))
    (/ x_m (/ (- t z) y)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -9e-9) || !(z <= 1.7e-35)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = x_m / ((t - z) / y);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-9d-9)) .or. (.not. (z <= 1.7d-35))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = x_m / ((t - z) / y)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -9e-9) || !(z <= 1.7e-35)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = x_m / ((t - z) / y);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -9e-9) or not (z <= 1.7e-35):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = x_m / ((t - z) / y)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -9e-9) || !(z <= 1.7e-35))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x_m / Float64(Float64(t - z) / y));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -9e-9) || ~((z <= 1.7e-35)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = x_m / ((t - z) / y);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -9e-9], N[Not[LessEqual[z, 1.7e-35]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-9} \lor \neg \left(z \leq 1.7 \cdot 10^{-35}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.99999999999999953e-9 or 1.7000000000000001e-35 < z

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999953e-9 < z < 1.7000000000000001e-35

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.2% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.52 \cdot 10^{-9} \lor \neg \left(z \leq 9 \cdot 10^{-63}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y - z}{t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -1.52e-9) (not (<= z 9e-63)))
    (* x_m (- 1.0 (/ y z)))
    (* x_m (/ (- y z) t)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -1.52e-9) || !(z <= 9e-63)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = x_m * ((y - z) / t);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.52d-9)) .or. (.not. (z <= 9d-63))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = x_m * ((y - z) / t)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -1.52e-9) || !(z <= 9e-63)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = x_m * ((y - z) / t);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -1.52e-9) or not (z <= 9e-63):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = x_m * ((y - z) / t)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -1.52e-9) || !(z <= 9e-63))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x_m * Float64(Float64(y - z) / t));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -1.52e-9) || ~((z <= 9e-63)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = x_m * ((y - z) / t);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.52e-9], N[Not[LessEqual[z, 9e-63]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{-9} \lor \neg \left(z \leq 9 \cdot 10^{-63}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.51999999999999992e-9 or 8.9999999999999999e-63 < z

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.51999999999999992e-9 < z < 8.9999999999999999e-63

    1. Initial program 92.8%

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

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

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

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

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

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

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

Alternative 6: 69.0% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-126} \lor \neg \left(z \leq 3.7 \cdot 10^{-60}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -3e-126) (not (<= z 3.7e-60)))
    (* x_m (- 1.0 (/ y z)))
    (* y (/ x_m t)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -3e-126) || !(z <= 3.7e-60)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = y * (x_m / t);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-3d-126)) .or. (.not. (z <= 3.7d-60))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = y * (x_m / t)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -3e-126) || !(z <= 3.7e-60)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = y * (x_m / t);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -3e-126) or not (z <= 3.7e-60):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = y * (x_m / t)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -3e-126) || !(z <= 3.7e-60))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(y * Float64(x_m / t));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -3e-126) || ~((z <= 3.7e-60)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = y * (x_m / t);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3e-126], N[Not[LessEqual[z, 3.7e-60]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-126} \lor \neg \left(z \leq 3.7 \cdot 10^{-60}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.0000000000000002e-126 or 3.70000000000000025e-60 < z

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000002e-126 < z < 3.70000000000000025e-60

    1. Initial program 93.1%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
    6. Step-by-step derivation
      1. *-commutative78.4%

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

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

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

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

Alternative 7: 59.8% accurate, 0.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-6}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (if (<= z -1.6e-6) x_m (if (<= z 1.4e-53) (* y (/ x_m t)) x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e-6) {
		tmp = x_m;
	} else if (z <= 1.4e-53) {
		tmp = y * (x_m / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.6d-6)) then
        tmp = x_m
    else if (z <= 1.4d-53) then
        tmp = y * (x_m / t)
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e-6) {
		tmp = x_m;
	} else if (z <= 1.4e-53) {
		tmp = y * (x_m / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if z <= -1.6e-6:
		tmp = x_m
	elif z <= 1.4e-53:
		tmp = y * (x_m / t)
	else:
		tmp = x_m
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (z <= -1.6e-6)
		tmp = x_m;
	elseif (z <= 1.4e-53)
		tmp = Float64(y * Float64(x_m / t));
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (z <= -1.6e-6)
		tmp = x_m;
	elseif (z <= 1.4e-53)
		tmp = y * (x_m / t);
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -1.6e-6], x$95$m, If[LessEqual[z, 1.4e-53], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], x$95$m]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-6}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5999999999999999e-6 or 1.39999999999999993e-53 < z

    1. Initial program 71.1%

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

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

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

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

    if -1.5999999999999999e-6 < z < 1.39999999999999993e-53

    1. Initial program 93.0%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
    6. Step-by-step derivation
      1. *-commutative69.3%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
    7. Applied egg-rr70.4%

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

Alternative 8: 60.4% accurate, 0.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+27}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-53}:\\ \;\;\;\;x\_m \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (if (<= z -1.9e+27) x_m (if (<= z 1.4e-53) (* x_m (/ y t)) x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.9e+27) {
		tmp = x_m;
	} else if (z <= 1.4e-53) {
		tmp = x_m * (y / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.9d+27)) then
        tmp = x_m
    else if (z <= 1.4d-53) then
        tmp = x_m * (y / t)
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.9e+27) {
		tmp = x_m;
	} else if (z <= 1.4e-53) {
		tmp = x_m * (y / t);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if z <= -1.9e+27:
		tmp = x_m
	elif z <= 1.4e-53:
		tmp = x_m * (y / t)
	else:
		tmp = x_m
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (z <= -1.9e+27)
		tmp = x_m;
	elseif (z <= 1.4e-53)
		tmp = Float64(x_m * Float64(y / t));
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (z <= -1.9e+27)
		tmp = x_m;
	elseif (z <= 1.4e-53)
		tmp = x_m * (y / t);
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -1.9e+27], x$95$m, If[LessEqual[z, 1.4e-53], N[(x$95$m * N[(y / t), $MachinePrecision]), $MachinePrecision], x$95$m]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+27}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.90000000000000011e27 or 1.39999999999999993e-53 < z

    1. Initial program 68.8%

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

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

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

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

    if -1.90000000000000011e27 < z < 1.39999999999999993e-53

    1. Initial program 92.4%

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

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

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

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

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

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

Alternative 9: 95.1% accurate, 0.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq 3.9 \cdot 10^{+157}:\\ \;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= y 3.9e+157)
    (* x_m (/ (- y z) (- t z)))
    (* (- z y) (/ x_m (- z t))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= 3.9e+157) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (z - y) * (x_m / (z - t));
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 3.9d+157) then
        tmp = x_m * ((y - z) / (t - z))
    else
        tmp = (z - y) * (x_m / (z - t))
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= 3.9e+157) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (z - y) * (x_m / (z - t));
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if y <= 3.9e+157:
		tmp = x_m * ((y - z) / (t - z))
	else:
		tmp = (z - y) * (x_m / (z - t))
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (y <= 3.9e+157)
		tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = Float64(Float64(z - y) * Float64(x_m / Float64(z - t)));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (y <= 3.9e+157)
		tmp = x_m * ((y - z) / (t - z));
	else
		tmp = (z - y) * (x_m / (z - t));
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, 3.9e+157], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 3.9 \cdot 10^{+157}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\

\mathbf{else}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.89999999999999971e157

    1. Initial program 81.5%

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

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

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

    if 3.89999999999999971e157 < y

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative81.5%

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

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

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

Alternative 10: 96.7% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot \frac{y - z}{t - z}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (* x_m (/ (- y z) (- t z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * (x_m * ((y - z) / (t - z)));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x_s * (x_m * ((y - z) / (t - z)))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * (x_m * ((y - z) / (t - z)));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	return x_s * (x_m * ((y - z) / (t - z)))
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	return Float64(x_s * Float64(x_m * Float64(Float64(y - z) / Float64(t - z))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp = code(x_s, x_m, y, z, t)
	tmp = x_s * (x_m * ((y - z) / (t - z)));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \left(x\_m \cdot \frac{y - z}{t - z}\right)
\end{array}
Derivation
  1. Initial program 81.5%

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

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

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

Alternative 11: 34.7% accurate, 9.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot x\_m \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t) :precision binary64 (* x_s x_m))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * x_m;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x_s * x_m
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * x_m;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	return x_s * x_m
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	return Float64(x_s * x_m)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp = code(x_s, x_m, y, z, t)
	tmp = x_s * x_m;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * x$95$m), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot x\_m
\end{array}
Derivation
  1. Initial program 81.5%

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

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

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

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

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

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

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