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

Percentage Accurate: 84.8% → 96.7%
Time: 8.0s
Alternatives: 15
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 15 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}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{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 (<= x_m 2e-26) (/ (* x_m (- y z)) (- t z)) (* (- y z) (/ 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 (x_m <= 2e-26) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (y - z) * (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 (x_m <= 2d-26) then
        tmp = (x_m * (y - z)) / (t - z)
    else
        tmp = (y - z) * (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 (x_m <= 2e-26) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (y - z) * (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 x_m <= 2e-26:
		tmp = (x_m * (y - z)) / (t - z)
	else:
		tmp = (y - z) * (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 (x_m <= 2e-26)
		tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(Float64(y - z) * 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 (x_m <= 2e-26)
		tmp = (x_m * (y - z)) / (t - z);
	else
		tmp = (y - z) * (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[LessEqual[x$95$m, 2e-26], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * 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}\;x\_m \leq 2 \cdot 10^{-26}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\

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


\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. Step-by-step derivation
      1. associate-*r/65.4%

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

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

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

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
  3. Recombined 2 regimes into one program.
  4. 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) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{x\_m}{\frac{z}{z - y}}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-201}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x\_m}}\\ \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}:\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \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 -2.9e+16)
    (/ x_m (/ z (- z y)))
    (if (<= z -2.75e-201)
      (/ (- y z) (/ t x_m))
      (if (<= z 2.15e-209)
        (/ (* x_m y) (- t z))
        (if (<= z 7.6e-60) (/ x_m (/ t (- y z))) (* x_m (- 1.0 (/ y 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.9e+16) {
		tmp = x_m / (z / (z - y));
	} else if (z <= -2.75e-201) {
		tmp = (y - z) / (t / x_m);
	} 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 = x_m * (1.0 - (y / 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.9d+16)) then
        tmp = x_m / (z / (z - y))
    else if (z <= (-2.75d-201)) then
        tmp = (y - z) / (t / x_m)
    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 = x_m * (1.0d0 - (y / 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.9e+16) {
		tmp = x_m / (z / (z - y));
	} else if (z <= -2.75e-201) {
		tmp = (y - z) / (t / x_m);
	} 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 = x_m * (1.0 - (y / 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.9e+16:
		tmp = x_m / (z / (z - y))
	elif z <= -2.75e-201:
		tmp = (y - z) / (t / x_m)
	elif z <= 2.15e-209:
		tmp = (x_m * y) / (t - z)
	elif z <= 7.6e-60:
		tmp = x_m / (t / (y - z))
	else:
		tmp = x_m * (1.0 - (y / 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.9e+16)
		tmp = Float64(x_m / Float64(z / Float64(z - y)));
	elseif (z <= -2.75e-201)
		tmp = Float64(Float64(y - z) / Float64(t / x_m));
	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 = Float64(x_m * Float64(1.0 - Float64(y / 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.9e+16)
		tmp = x_m / (z / (z - y));
	elseif (z <= -2.75e-201)
		tmp = (y - z) / (t / x_m);
	elseif (z <= 2.15e-209)
		tmp = (x_m * y) / (t - z);
	elseif (z <= 7.6e-60)
		tmp = x_m / (t / (y - z));
	else
		tmp = x_m * (1.0 - (y / 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[LessEqual[z, -2.9e+16], N[(x$95$m / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.75e-201], N[(N[(y - z), $MachinePrecision] / N[(t / x$95$m), $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], N[(x$95$m * N[(1.0 - N[(y / 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.9 \cdot 10^{+16}:\\
\;\;\;\;\frac{x\_m}{\frac{z}{z - y}}\\

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

\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}:\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.9e16

    1. Initial program 71.2%

      \[\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. Step-by-step derivation
      1. clear-num99.6%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    8. Step-by-step derivation
      1. neg-mul-180.1%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{-\left(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. associate-/r/93.7%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{t - z} \cdot \left(y - z\right)\right)} \]
    7. Taylor expanded in t around inf 77.0%

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

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

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

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

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      2. un-div-inv79.6%

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

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

    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}}} \]

    if 7.59999999999999989e-60 < z

    1. Initial program 76.8%

      \[\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 66.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{\frac{z}{z - y}}\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{-201}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \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 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 -3.6 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.32 \cdot 10^{-201}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x\_m}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-209}:\\ \;\;\;\;\frac{x\_m \cdot y}{t - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-61}:\\ \;\;\;\;\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 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -3.6e+15)
      t_1
      (if (<= z -1.32e-201)
        (/ (- y z) (/ t x_m))
        (if (<= z 1.95e-209)
          (/ (* x_m y) (- t z))
          (if (<= z 9.2e-61) (/ 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 <= -3.6e+15) {
		tmp = t_1;
	} else if (z <= -1.32e-201) {
		tmp = (y - z) / (t / x_m);
	} else if (z <= 1.95e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 9.2e-61) {
		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 <= (-3.6d+15)) then
        tmp = t_1
    else if (z <= (-1.32d-201)) then
        tmp = (y - z) / (t / x_m)
    else if (z <= 1.95d-209) then
        tmp = (x_m * y) / (t - z)
    else if (z <= 9.2d-61) 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 <= -3.6e+15) {
		tmp = t_1;
	} else if (z <= -1.32e-201) {
		tmp = (y - z) / (t / x_m);
	} else if (z <= 1.95e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 9.2e-61) {
		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 <= -3.6e+15:
		tmp = t_1
	elif z <= -1.32e-201:
		tmp = (y - z) / (t / x_m)
	elif z <= 1.95e-209:
		tmp = (x_m * y) / (t - z)
	elif z <= 9.2e-61:
		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 <= -3.6e+15)
		tmp = t_1;
	elseif (z <= -1.32e-201)
		tmp = Float64(Float64(y - z) / Float64(t / x_m));
	elseif (z <= 1.95e-209)
		tmp = Float64(Float64(x_m * y) / Float64(t - z));
	elseif (z <= 9.2e-61)
		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 <= -3.6e+15)
		tmp = t_1;
	elseif (z <= -1.32e-201)
		tmp = (y - z) / (t / x_m);
	elseif (z <= 1.95e-209)
		tmp = (x_m * y) / (t - z);
	elseif (z <= 9.2e-61)
		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, -3.6e+15], t$95$1, If[LessEqual[z, -1.32e-201], N[(N[(y - z), $MachinePrecision] / N[(t / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-209], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-61], 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 -3.6 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-61}:\\
\;\;\;\;\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 < -3.6e15 or 9.19999999999999967e-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. div-sub82.3%

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

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

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

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

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

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

    if -3.6e15 < z < -1.31999999999999996e-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. associate-/r/93.7%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{t - z} \cdot \left(y - z\right)\right)} \]
    7. Taylor expanded in t around inf 77.0%

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

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

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

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

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      2. un-div-inv79.6%

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

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

    if -1.31999999999999996e-201 < z < 1.95e-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 1.95e-209 < z < 9.19999999999999967e-61

    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. Add Preprocessing

Alternative 4: 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 -1.05 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-204}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-209}:\\ \;\;\;\;\frac{x\_m \cdot y}{t - z}\\ \mathbf{elif}\;z \leq 8 \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 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -1.05e+20)
      t_1
      (if (<= z -1.55e-204)
        (* (- y z) (/ x_m t))
        (if (<= z 2.1e-209)
          (/ (* x_m y) (- t z))
          (if (<= z 8e-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 <= -1.05e+20) {
		tmp = t_1;
	} else if (z <= -1.55e-204) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 2.1e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 8e-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 <= (-1.05d+20)) then
        tmp = t_1
    else if (z <= (-1.55d-204)) then
        tmp = (y - z) * (x_m / t)
    else if (z <= 2.1d-209) then
        tmp = (x_m * y) / (t - z)
    else if (z <= 8d-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 <= -1.05e+20) {
		tmp = t_1;
	} else if (z <= -1.55e-204) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 2.1e-209) {
		tmp = (x_m * y) / (t - z);
	} else if (z <= 8e-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 <= -1.05e+20:
		tmp = t_1
	elif z <= -1.55e-204:
		tmp = (y - z) * (x_m / t)
	elif z <= 2.1e-209:
		tmp = (x_m * y) / (t - z)
	elif z <= 8e-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 <= -1.05e+20)
		tmp = t_1;
	elseif (z <= -1.55e-204)
		tmp = Float64(Float64(y - z) * Float64(x_m / t));
	elseif (z <= 2.1e-209)
		tmp = Float64(Float64(x_m * y) / Float64(t - z));
	elseif (z <= 8e-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 <= -1.05e+20)
		tmp = t_1;
	elseif (z <= -1.55e-204)
		tmp = (y - z) * (x_m / t);
	elseif (z <= 2.1e-209)
		tmp = (x_m * y) / (t - z);
	elseif (z <= 8e-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, -1.05e+20], t$95$1, If[LessEqual[z, -1.55e-204], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-209], N[(N[(x$95$m * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-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 -1.05 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 8 \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 < -1.05e20 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. div-sub82.3%

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

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

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

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

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

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

    if -1.05e20 < z < -1.55e-204

    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. associate-/r/93.7%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{t - z} \cdot \left(y - z\right)\right)} \]
    7. Taylor expanded in t around inf 77.0%

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

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

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

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

    if -1.55e-204 < z < 2.09999999999999996e-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.09999999999999996e-209 < z < 7.9999999999999998e-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. Add Preprocessing

Alternative 5: 73.6% 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^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-242}:\\ \;\;\;\;x\_m \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-234}:\\ \;\;\;\;\frac{x\_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-29}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \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
 (let* ((t_1 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -2.9e+18)
      t_1
      (if (<= z -2.9e-242)
        (* x_m (/ (- y z) t))
        (if (<= z 7.4e-234)
          (/ (* x_m y) t)
          (if (<= z 4.6e-29) (* x_m (/ y (- t 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+18) {
		tmp = t_1;
	} else if (z <= -2.9e-242) {
		tmp = x_m * ((y - z) / t);
	} else if (z <= 7.4e-234) {
		tmp = (x_m * y) / t;
	} else if (z <= 4.6e-29) {
		tmp = x_m * (y / (t - 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+18)) then
        tmp = t_1
    else if (z <= (-2.9d-242)) then
        tmp = x_m * ((y - z) / t)
    else if (z <= 7.4d-234) then
        tmp = (x_m * y) / t
    else if (z <= 4.6d-29) then
        tmp = x_m * (y / (t - 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+18) {
		tmp = t_1;
	} else if (z <= -2.9e-242) {
		tmp = x_m * ((y - z) / t);
	} else if (z <= 7.4e-234) {
		tmp = (x_m * y) / t;
	} else if (z <= 4.6e-29) {
		tmp = x_m * (y / (t - 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+18:
		tmp = t_1
	elif z <= -2.9e-242:
		tmp = x_m * ((y - z) / t)
	elif z <= 7.4e-234:
		tmp = (x_m * y) / t
	elif z <= 4.6e-29:
		tmp = x_m * (y / (t - 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+18)
		tmp = t_1;
	elseif (z <= -2.9e-242)
		tmp = Float64(x_m * Float64(Float64(y - z) / t));
	elseif (z <= 7.4e-234)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 4.6e-29)
		tmp = Float64(x_m * Float64(y / Float64(t - 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+18)
		tmp = t_1;
	elseif (z <= -2.9e-242)
		tmp = x_m * ((y - z) / t);
	elseif (z <= 7.4e-234)
		tmp = (x_m * y) / t;
	elseif (z <= 4.6e-29)
		tmp = x_m * (y / (t - 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+18], t$95$1, If[LessEqual[z, -2.9e-242], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-234], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.6e-29], N[(x$95$m * N[(y / N[(t - 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^{+18}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9e18 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. div-sub82.6%

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

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

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

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

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

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

    if -2.9e18 < z < -2.9000000000000001e-242

    1. Initial program 91.5%

      \[\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 t around inf 80.4%

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

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

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

    if -2.9000000000000001e-242 < z < 7.40000000000000025e-234

    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}} \]

    if 7.40000000000000025e-234 < z < 4.59999999999999982e-29

    1. Initial program 87.5%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
  3. Recombined 4 regimes into one program.
  4. 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.9 \cdot 10^{+15} \lor \neg \left(z \leq 4.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 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -3.9e+15) (not (<= z 4.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.9e+15) || !(z <= 4.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.9d+15)) .or. (.not. (z <= 4.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.9e+15) || !(z <= 4.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.9e+15) or not (z <= 4.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.9e+15) || !(z <= 4.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.9e+15) || ~((z <= 4.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.9e+15], N[Not[LessEqual[z, 4.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.9 \cdot 10^{+15} \lor \neg \left(z \leq 4.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.9e15 or 4.6000000000000003e-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. div-sub82.3%

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

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

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

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

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

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

    if -3.9e15 < z < 4.6000000000000003e-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. associate-/r/89.8%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{t - z} \cdot \left(y - z\right)\right)} \]
    7. Taylor expanded in t around inf 80.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+15} \lor \neg \left(z \leq 4.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: 73.9% 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 -8.5 \cdot 10^{+19} \lor \neg \left(z \leq 2.7 \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 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -8.5e+19) (not (<= z 2.7e-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 <= -8.5e+19) || !(z <= 2.7e-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 <= (-8.5d+19)) .or. (.not. (z <= 2.7d-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 <= -8.5e+19) || !(z <= 2.7e-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 <= -8.5e+19) or not (z <= 2.7e-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 <= -8.5e+19) || !(z <= 2.7e-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 <= -8.5e+19) || ~((z <= 2.7e-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, -8.5e+19], N[Not[LessEqual[z, 2.7e-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 -8.5 \cdot 10^{+19} \lor \neg \left(z \leq 2.7 \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 < -8.5e19 or 2.70000000000000023e-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. div-sub82.6%

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

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

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

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

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

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

    if -8.5e19 < z < 2.70000000000000023e-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. Step-by-step derivation
      1. clear-num88.5%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{t - z} \cdot \left(y - z\right)\right)} \]
    7. Taylor expanded in y around inf 77.7%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{t - z}} \]
    9. Simplified80.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 -8.5 \cdot 10^{+19} \lor \neg \left(z \leq 2.7 \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 8: 74.8% 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 -8.6 \cdot 10^{+19} \lor \neg \left(z \leq 2.1 \cdot 10^{-29}\right):\\ \;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{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 -8.6e+19) (not (<= z 2.1e-29)))
    (* 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 <= -8.6e+19) || !(z <= 2.1e-29)) {
		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 <= (-8.6d+19)) .or. (.not. (z <= 2.1d-29))) 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 <= -8.6e+19) || !(z <= 2.1e-29)) {
		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 <= -8.6e+19) or not (z <= 2.1e-29):
		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 <= -8.6e+19) || !(z <= 2.1e-29))
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x_m * Float64(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 <= -8.6e+19) || ~((z <= 2.1e-29)))
		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, -8.6e+19], N[Not[LessEqual[z, 2.1e-29]], $MachinePrecision]], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(y / 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 -8.6 \cdot 10^{+19} \lor \neg \left(z \leq 2.1 \cdot 10^{-29}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6e19 or 2.09999999999999989e-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. div-sub82.6%

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

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

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

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

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

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

    if -8.6e19 < z < 2.09999999999999989e-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. associate-/l*77.5%

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

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

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

Alternative 9: 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 -2.25 \cdot 10^{+15} \lor \neg \left(z \leq 2.45 \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 -2.25e+15) (not (<= z 2.45e-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 <= -2.25e+15) || !(z <= 2.45e-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 <= (-2.25d+15)) .or. (.not. (z <= 2.45d-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 <= -2.25e+15) || !(z <= 2.45e-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 <= -2.25e+15) or not (z <= 2.45e-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 <= -2.25e+15) || !(z <= 2.45e-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 <= -2.25e+15) || ~((z <= 2.45e-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, -2.25e+15], N[Not[LessEqual[z, 2.45e-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 -2.25 \cdot 10^{+15} \lor \neg \left(z \leq 2.45 \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 < -2.25e15 or 2.44999999999999994e-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. div-sub82.3%

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

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

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

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

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

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

    if -2.25e15 < z < 2.44999999999999994e-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. Taylor expanded in z around 0 68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot x} \]
      2. div-inv70.0%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      5. clear-num71.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+15} \lor \neg \left(z \leq 2.45 \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 10: 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 -6.2 \cdot 10^{+15} \lor \neg \left(z \leq 6.4 \cdot 10^{+18}\right):\\ \;\;\;\;x\_m\\ \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 -6.2e+15) (not (<= z 6.4e+18))) x_m (* 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 <= -6.2e+15) || !(z <= 6.4e+18)) {
		tmp = x_m;
	} 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 <= (-6.2d+15)) .or. (.not. (z <= 6.4d+18))) then
        tmp = x_m
    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 <= -6.2e+15) || !(z <= 6.4e+18)) {
		tmp = x_m;
	} 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 <= -6.2e+15) or not (z <= 6.4e+18):
		tmp = x_m
	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 <= -6.2e+15) || !(z <= 6.4e+18))
		tmp = x_m;
	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 <= -6.2e+15) || ~((z <= 6.4e+18)))
		tmp = x_m;
	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, -6.2e+15], N[Not[LessEqual[z, 6.4e+18]], $MachinePrecision]], x$95$m, 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 -6.2 \cdot 10^{+15} \lor \neg \left(z \leq 6.4 \cdot 10^{+18}\right):\\
\;\;\;\;x\_m\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2e15 or 6.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 -6.2e15 < z < 6.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}} \]
    8. Step-by-step derivation
      1. *-commutative67.0%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot x} \]
      2. div-inv66.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{x}}} \]
      5. clear-num67.7%

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

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

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

Alternative 11: 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 -6.5 \cdot 10^{+16} \lor \neg \left(z \leq 4.6 \cdot 10^{+18}\right):\\ \;\;\;\;x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y}{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 -6.5e+16) (not (<= z 4.6e+18))) x_m (* x_m (/ y 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 <= -6.5e+16) || !(z <= 4.6e+18)) {
		tmp = x_m;
	} else {
		tmp = x_m * (y / 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 <= (-6.5d+16)) .or. (.not. (z <= 4.6d+18))) then
        tmp = x_m
    else
        tmp = x_m * (y / 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 <= -6.5e+16) || !(z <= 4.6e+18)) {
		tmp = x_m;
	} else {
		tmp = x_m * (y / 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 <= -6.5e+16) or not (z <= 4.6e+18):
		tmp = x_m
	else:
		tmp = x_m * (y / 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 <= -6.5e+16) || !(z <= 4.6e+18))
		tmp = x_m;
	else
		tmp = Float64(x_m * Float64(y / 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 <= -6.5e+16) || ~((z <= 4.6e+18)))
		tmp = x_m;
	else
		tmp = x_m * (y / 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, -6.5e+16], N[Not[LessEqual[z, 4.6e+18]], $MachinePrecision]], x$95$m, N[(x$95$m * N[(y / 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 -6.5 \cdot 10^{+16} \lor \neg \left(z \leq 4.6 \cdot 10^{+18}\right):\\
\;\;\;\;x\_m\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5e16 or 4.6e18 < 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 -6.5e16 < z < 4.6e18

    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 -6.5 \cdot 10^{+16} \lor \neg \left(z \leq 4.6 \cdot 10^{+18}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 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}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{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 (<= x_m 3.5e-26)
    (/ x_m (/ (- t z) (- y z)))
    (* (- y z) (/ 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 (x_m <= 3.5e-26) {
		tmp = x_m / ((t - z) / (y - z));
	} else {
		tmp = (y - z) * (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 (x_m <= 3.5d-26) then
        tmp = x_m / ((t - z) / (y - z))
    else
        tmp = (y - z) * (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 (x_m <= 3.5e-26) {
		tmp = x_m / ((t - z) / (y - z));
	} else {
		tmp = (y - z) * (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 x_m <= 3.5e-26:
		tmp = x_m / ((t - z) / (y - z))
	else:
		tmp = (y - z) * (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 (x_m <= 3.5e-26)
		tmp = Float64(x_m / Float64(Float64(t - z) / Float64(y - z)));
	else
		tmp = Float64(Float64(y - z) * 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 (x_m <= 3.5e-26)
		tmp = x_m / ((t - z) / (y - z));
	else
		tmp = (y - z) * (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[LessEqual[x$95$m, 3.5e-26], N[(x$95$m / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * 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}\;x\_m \leq 3.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{x\_m}{\frac{t - z}{y - z}}\\

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


\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. Step-by-step derivation
      1. associate-*r/65.4%

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

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

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

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

Alternative 13: 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}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{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 (<= x_m 4.4e-26)
    (* x_m (/ (- y z) (- t z)))
    (* (- y z) (/ 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 (x_m <= 4.4e-26) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (y - z) * (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 (x_m <= 4.4d-26) then
        tmp = x_m * ((y - z) / (t - z))
    else
        tmp = (y - z) * (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 (x_m <= 4.4e-26) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = (y - z) * (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 x_m <= 4.4e-26:
		tmp = x_m * ((y - z) / (t - z))
	else:
		tmp = (y - z) * (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 (x_m <= 4.4e-26)
		tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = Float64(Float64(y - z) * 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 (x_m <= 4.4e-26)
		tmp = x_m * ((y - z) / (t - z));
	else
		tmp = (y - z) * (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[LessEqual[x$95$m, 4.4e-26], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * 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}\;x\_m \leq 4.4 \cdot 10^{-26}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\

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


\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. Step-by-step derivation
      1. associate-*r/65.4%

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

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

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

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

Alternative 14: 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 #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 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. Add Preprocessing

Alternative 15: 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 #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 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. 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)))