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

Percentage Accurate: 84.8% → 96.7%
Time: 9.3s
Alternatives: 12
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 12 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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% 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 2 \cdot 10^{-26}:\\ \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 2e-26) (/ (* x_m (- y z)) (- t z)) (* (/ x_m (- z 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 (x_m <= 2e-26) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (x_m / (z - 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 (x_m <= 2d-26) then
        tmp = (x_m * (y - z)) / (t - z)
    else
        tmp = (x_m / (z - 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 (x_m <= 2e-26) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (x_m / (z - 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 x_m <= 2e-26:
		tmp = (x_m * (y - z)) / (t - z)
	else:
		tmp = (x_m / (z - 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 (x_m <= 2e-26)
		tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(Float64(x_m / Float64(z - t)) * Float64(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 (x_m <= 2e-26)
		tmp = (x_m * (y - z)) / (t - z);
	else
		tmp = (x_m / (z - 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[LessEqual[x$95$m, 2e-26], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - 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}\;x\_m \leq 2 \cdot 10^{-26}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.0000000000000001e-26

    1. Initial program 88.1%

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

    if 2.0000000000000001e-26 < x

    1. Initial program 65.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg65.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-98.2%

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

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

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

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

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

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

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

Alternative 2: 72.7% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := x\_m \cdot \frac{y - z}{t}\\ t_2 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+18}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-233}:\\ \;\;\;\;\frac{x\_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-60}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (/ (- y z) t))) (t_2 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -5.6e+18)
      t_2
      (if (<= z -6.4e-242)
        t_1
        (if (<= z 6e-233) (/ (* x_m y) t) (if (<= z 8e-60) t_1 t_2)))))))
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 t_1 = x_m * ((y - z) / t);
	double t_2 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -5.6e+18) {
		tmp = t_2;
	} else if (z <= -6.4e-242) {
		tmp = t_1;
	} else if (z <= 6e-233) {
		tmp = (x_m * y) / t;
	} else if (z <= 8e-60) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x_m * ((y - z) / t)
    t_2 = x_m * (1.0d0 - (y / z))
    if (z <= (-5.6d+18)) then
        tmp = t_2
    else if (z <= (-6.4d-242)) then
        tmp = t_1
    else if (z <= 6d-233) then
        tmp = (x_m * y) / t
    else if (z <= 8d-60) then
        tmp = t_1
    else
        tmp = t_2
    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 t_1 = x_m * ((y - z) / t);
	double t_2 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -5.6e+18) {
		tmp = t_2;
	} else if (z <= -6.4e-242) {
		tmp = t_1;
	} else if (z <= 6e-233) {
		tmp = (x_m * y) / t;
	} else if (z <= 8e-60) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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):
	t_1 = x_m * ((y - z) / t)
	t_2 = x_m * (1.0 - (y / z))
	tmp = 0
	if z <= -5.6e+18:
		tmp = t_2
	elif z <= -6.4e-242:
		tmp = t_1
	elif z <= 6e-233:
		tmp = (x_m * y) / t
	elif z <= 8e-60:
		tmp = t_1
	else:
		tmp = t_2
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m * Float64(Float64(y - z) / t))
	t_2 = Float64(x_m * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -5.6e+18)
		tmp = t_2;
	elseif (z <= -6.4e-242)
		tmp = t_1;
	elseif (z <= 6e-233)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 8e-60)
		tmp = t_1;
	else
		tmp = t_2;
	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)
	t_1 = x_m * ((y - z) / t);
	t_2 = x_m * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -5.6e+18)
		tmp = t_2;
	elseif (z <= -6.4e-242)
		tmp = t_1;
	elseif (z <= 6e-233)
		tmp = (x_m * y) / t;
	elseif (z <= 8e-60)
		tmp = t_1;
	else
		tmp = t_2;
	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_] := Block[{t$95$1 = N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -5.6e+18], t$95$2, If[LessEqual[z, -6.4e-242], t$95$1, If[LessEqual[z, 6e-233], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 8e-60], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := x\_m \cdot \frac{y - z}{t}\\
t_2 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6e18 or 7.9999999999999998e-60 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6e18 < z < -6.39999999999999997e-242 or 5.99999999999999997e-233 < z < 7.9999999999999998e-60

    1. Initial program 89.1%

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

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

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

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

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

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

    if -6.39999999999999997e-242 < z < 5.99999999999999997e-233

    1. Initial program 97.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-242}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-233}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.7% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-201}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-209}:\\ \;\;\;\;\frac{x\_m \cdot y}{t - z}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-60}:\\ \;\;\;\;\frac{x\_m}{\frac{t}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -2.9e+16)
      t_1
      (if (<= z -2.75e-201)
        (* (- y z) (/ x_m t))
        (if (<= z 2.15e-209)
          (/ (* x_m y) (- t z))
          (if (<= z 7.6e-60) (/ x_m (/ t (- y z))) t_1)))))))
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 t_1 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -2.9e+16) {
		tmp = t_1;
	} else if (z <= -2.75e-201) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 2.15e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 7.6e-60) {
		tmp = x_m / (t / (y - z));
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = x_m * (1.0d0 - (y / z))
    if (z <= (-2.9d+16)) then
        tmp = t_1
    else if (z <= (-2.75d-201)) then
        tmp = (y - z) * (x_m / t)
    else if (z <= 2.15d-209) then
        tmp = (x_m * y) / (t - z)
    else if (z <= 7.6d-60) then
        tmp = x_m / (t / (y - z))
    else
        tmp = t_1
    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 t_1 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -2.9e+16) {
		tmp = t_1;
	} else if (z <= -2.75e-201) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 2.15e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 7.6e-60) {
		tmp = x_m / (t / (y - z));
	} else {
		tmp = t_1;
	}
	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):
	t_1 = x_m * (1.0 - (y / z))
	tmp = 0
	if z <= -2.9e+16:
		tmp = t_1
	elif z <= -2.75e-201:
		tmp = (y - z) * (x_m / t)
	elif z <= 2.15e-209:
		tmp = (x_m * y) / (t - z)
	elif z <= 7.6e-60:
		tmp = x_m / (t / (y - z))
	else:
		tmp = t_1
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -2.9e+16)
		tmp = t_1;
	elseif (z <= -2.75e-201)
		tmp = Float64(Float64(y - z) * Float64(x_m / t));
	elseif (z <= 2.15e-209)
		tmp = Float64(Float64(x_m * y) / Float64(t - z));
	elseif (z <= 7.6e-60)
		tmp = Float64(x_m / Float64(t / Float64(y - z)));
	else
		tmp = t_1;
	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)
	t_1 = x_m * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -2.9e+16)
		tmp = t_1;
	elseif (z <= -2.75e-201)
		tmp = (y - z) * (x_m / t);
	elseif (z <= 2.15e-209)
		tmp = (x_m * y) / (t - z);
	elseif (z <= 7.6e-60)
		tmp = x_m / (t / (y - z));
	else
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.9e+16], t$95$1, If[LessEqual[z, -2.75e-201], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-209], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-60], N[(x$95$m / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9e16 or 7.59999999999999989e-60 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e16 < z < -2.75000000000000017e-201

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

    if -2.75000000000000017e-201 < z < 2.15000000000000003e-209

    1. Initial program 97.9%

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

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

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

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

    if 2.15000000000000003e-209 < z < 7.59999999999999989e-60

    1. Initial program 84.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-201}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-209}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-60}:\\ \;\;\;\;\frac{x}{\frac{t}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.6% 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.8 \cdot 10^{+17} \lor \neg \left(z \leq 7.5 \cdot 10^{-61}\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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -1.8e+17) (not (<= z 7.5e-61)))
    (* 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 <= -1.8e+17) || !(z <= 7.5e-61)) {
		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 <= (-1.8d+17)) .or. (.not. (z <= 7.5d-61))) 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 <= -1.8e+17) || !(z <= 7.5e-61)) {
		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 <= -1.8e+17) or not (z <= 7.5e-61):
		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 <= -1.8e+17) || !(z <= 7.5e-61))
		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 <= -1.8e+17) || ~((z <= 7.5e-61)))
		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, -1.8e+17], N[Not[LessEqual[z, 7.5e-61]], $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 -1.8 \cdot 10^{+17} \lor \neg \left(z \leq 7.5 \cdot 10^{-61}\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 < -1.8e17 or 7.50000000000000047e-61 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e17 < z < 7.50000000000000047e-61

    1. Initial program 91.3%

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

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

      \[\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. Step-by-step derivation
      1. *-commutative77.1%

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

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

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

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

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

Alternative 5: 74.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 -2.6 \cdot 10^{+17} \lor \neg \left(z \leq 4.6 \cdot 10^{-29}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x\_m}{t - z}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -2.6e+17) (not (<= z 4.6e-29)))
    (* x_m (- 1.0 (/ y z)))
    (* y (/ x_m (- 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 <= -2.6e+17) || !(z <= 4.6e-29)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = y * (x_m / (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 <= (-2.6d+17)) .or. (.not. (z <= 4.6d-29))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = y * (x_m / (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 <= -2.6e+17) || !(z <= 4.6e-29)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = y * (x_m / (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 <= -2.6e+17) or not (z <= 4.6e-29):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = y * (x_m / (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 <= -2.6e+17) || !(z <= 4.6e-29))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(y * Float64(x_m / 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 <= -2.6e+17) || ~((z <= 4.6e-29)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = y * (x_m / (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, -2.6e+17], N[Not[LessEqual[z, 4.6e-29]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x$95$m / 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 \begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+17} \lor \neg \left(z \leq 4.6 \cdot 10^{-29}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6e17 or 4.59999999999999982e-29 < z

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e17 < z < 4.59999999999999982e-29

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

Alternative 6: 72.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 -3.6 \cdot 10^{+15} \lor \neg \left(z \leq 7.6 \cdot 10^{-60}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -3.6e+15) (not (<= z 7.6e-60)))
    (* x_m (- 1.0 (/ y z)))
    (* (- y z) (/ 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 <= -3.6e+15) || !(z <= 7.6e-60)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = (y - z) * (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 <= (-3.6d+15)) .or. (.not. (z <= 7.6d-60))) then
        tmp = x_m * (1.0d0 - (y / z))
    else
        tmp = (y - z) * (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 <= -3.6e+15) || !(z <= 7.6e-60)) {
		tmp = x_m * (1.0 - (y / z));
	} else {
		tmp = (y - z) * (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 <= -3.6e+15) or not (z <= 7.6e-60):
		tmp = x_m * (1.0 - (y / z))
	else:
		tmp = (y - z) * (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 <= -3.6e+15) || !(z <= 7.6e-60))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(Float64(y - z) * 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 <= -3.6e+15) || ~((z <= 7.6e-60)))
		tmp = x_m * (1.0 - (y / z));
	else
		tmp = (y - z) * (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, -3.6e+15], N[Not[LessEqual[z, 7.6e-60]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * 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.6 \cdot 10^{+15} \lor \neg \left(z \leq 7.6 \cdot 10^{-60}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6e15 or 7.59999999999999989e-60 < z

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e15 < z < 7.59999999999999989e-60

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 61.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}\;z \leq -5.6 \cdot 10^{+17}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+18}:\\ \;\;\;\;x\_m \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (if (<= z -5.6e+17) x_m (if (<= z 5.4e+18) (* 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 <= -5.6e+17) {
		tmp = x_m;
	} else if (z <= 5.4e+18) {
		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 <= (-5.6d+17)) then
        tmp = x_m
    else if (z <= 5.4d+18) 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 <= -5.6e+17) {
		tmp = x_m;
	} else if (z <= 5.4e+18) {
		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 <= -5.6e+17:
		tmp = x_m
	elif z <= 5.4e+18:
		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 <= -5.6e+17)
		tmp = x_m;
	elseif (z <= 5.4e+18)
		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 <= -5.6e+17)
		tmp = x_m;
	elseif (z <= 5.4e+18)
		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, -5.6e+17], x$95$m, If[LessEqual[z, 5.4e+18], 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 -5.6 \cdot 10^{+17}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6e17 or 5.4e18 < z

    1. Initial program 72.3%

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

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

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

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

    if -5.6e17 < z < 5.4e18

    1. Initial program 91.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.9% 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^{+16}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (if (<= z -1.9e+16) x_m (if (<= z 3.4e+18) (* 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.9e+16) {
		tmp = x_m;
	} else if (z <= 3.4e+18) {
		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.9d+16)) then
        tmp = x_m
    else if (z <= 3.4d+18) 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.9e+16) {
		tmp = x_m;
	} else if (z <= 3.4e+18) {
		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.9e+16:
		tmp = x_m
	elif z <= 3.4e+18:
		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.9e+16)
		tmp = x_m;
	elseif (z <= 3.4e+18)
		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.9e+16)
		tmp = x_m;
	elseif (z <= 3.4e+18)
		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.9e+16], x$95$m, If[LessEqual[z, 3.4e+18], 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.9 \cdot 10^{+16}:\\
\;\;\;\;x\_m\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;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.9e16 or 3.4e18 < z

    1. Initial program 72.3%

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

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

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

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

    if -1.9e16 < z < 3.4e18

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 96.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}\;x\_m \leq 4.4 \cdot 10^{-26}:\\ \;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 4.4e-26)
    (* x_m (/ (- y z) (- t z)))
    (* (/ x_m (- z 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 (x_m <= 4.4e-26) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (x_m / (z - 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 (x_m <= 4.4d-26) then
        tmp = x_m * ((y - z) / (t - z))
    else
        tmp = (x_m / (z - 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 (x_m <= 4.4e-26) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (x_m / (z - 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 x_m <= 4.4e-26:
		tmp = x_m * ((y - z) / (t - z))
	else:
		tmp = (x_m / (z - 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 (x_m <= 4.4e-26)
		tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = Float64(Float64(x_m / Float64(z - t)) * Float64(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 (x_m <= 4.4e-26)
		tmp = x_m * ((y - z) / (t - z));
	else
		tmp = (x_m / (z - 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[LessEqual[x$95$m, 4.4e-26], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - 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}\;x\_m \leq 4.4 \cdot 10^{-26}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4.4000000000000002e-26

    1. Initial program 88.1%

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

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

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

    if 4.4000000000000002e-26 < x

    1. Initial program 65.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg65.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-98.2%

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

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

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

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

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

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

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

Alternative 10: 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 3.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{x\_m}{\frac{t - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z - t} \cdot \left(z - y\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 3.5e-26)
    (/ x_m (/ (- t z) (- y z)))
    (* (/ x_m (- z 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 (x_m <= 3.5e-26) {
		tmp = x_m / ((t - z) / (y - z));
	} else {
		tmp = (x_m / (z - 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 (x_m <= 3.5d-26) then
        tmp = x_m / ((t - z) / (y - z))
    else
        tmp = (x_m / (z - 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 (x_m <= 3.5e-26) {
		tmp = x_m / ((t - z) / (y - z));
	} else {
		tmp = (x_m / (z - 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 x_m <= 3.5e-26:
		tmp = x_m / ((t - z) / (y - z))
	else:
		tmp = (x_m / (z - 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 (x_m <= 3.5e-26)
		tmp = Float64(x_m / Float64(Float64(t - z) / Float64(y - z)));
	else
		tmp = Float64(Float64(x_m / Float64(z - t)) * Float64(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 (x_m <= 3.5e-26)
		tmp = x_m / ((t - z) / (y - z));
	else
		tmp = (x_m / (z - 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[LessEqual[x$95$m, 3.5e-26], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(z - 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}\;x\_m \leq 3.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{x\_m}{\frac{t - z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.49999999999999985e-26

    1. Initial program 88.1%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.3%

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

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

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

    if 3.49999999999999985e-26 < x

    1. Initial program 65.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}} \]
    6. Step-by-step derivation
      1. remove-double-neg65.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-98.2%

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

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

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

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

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

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

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

Alternative 11: 96.9% 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 1 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 82.5%

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

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

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

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

Alternative 12: 34.8% 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 1 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 82.5%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification33.3%

    \[\leadsto x \]
  7. Add Preprocessing

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

  :alt
  (/ x (/ (- t z) (- y z)))

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