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

Percentage Accurate: 83.8% → 96.8%
Time: 12.8s
Alternatives: 19
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 19 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: 83.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.8% accurate, 0.8× 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.6 \cdot 10^{-16}:\\ \;\;\;\;\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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 3.6e-16)
    (/ (* 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 <= 3.6e-16) {
		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 <= 3.6d-16) 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 <= 3.6e-16) {
		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 <= 3.6e-16:
		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 <= 3.6e-16)
		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 <= 3.6e-16)
		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, 3.6e-16], 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 3.6 \cdot 10^{-16}:\\
\;\;\;\;\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 < 3.59999999999999983e-16

    1. Initial program 85.9%

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

    if 3.59999999999999983e-16 < x

    1. Initial program 79.5%

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

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

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

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

Alternative 2: 58.8% accurate, 0.5× 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{t}{z}\right)\\ t_2 := x_m \cdot \frac{-y}{z}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-x_m}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-7}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \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 (/ t z)))) (t_2 (* x_m (/ (- y) z))))
   (*
    x_s
    (if (<= z -1.15e+151)
      x_m
      (if (<= z -1.2e+104)
        t_2
        (if (<= z -2.8e+61)
          t_1
          (if (<= z -5.5e-51)
            (/ (- x_m) (/ t z))
            (if (<= z 7e-7) (/ (* x_m y) t) (if (<= z 4e+82) t_2 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 + (t / z));
	double t_2 = x_m * (-y / z);
	double tmp;
	if (z <= -1.15e+151) {
		tmp = x_m;
	} else if (z <= -1.2e+104) {
		tmp = t_2;
	} else if (z <= -2.8e+61) {
		tmp = t_1;
	} else if (z <= -5.5e-51) {
		tmp = -x_m / (t / z);
	} else if (z <= 7e-7) {
		tmp = (x_m * y) / t;
	} else if (z <= 4e+82) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x_m * (1.0d0 + (t / z))
    t_2 = x_m * (-y / z)
    if (z <= (-1.15d+151)) then
        tmp = x_m
    else if (z <= (-1.2d+104)) then
        tmp = t_2
    else if (z <= (-2.8d+61)) then
        tmp = t_1
    else if (z <= (-5.5d-51)) then
        tmp = -x_m / (t / z)
    else if (z <= 7d-7) then
        tmp = (x_m * y) / t
    else if (z <= 4d+82) then
        tmp = t_2
    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 + (t / z));
	double t_2 = x_m * (-y / z);
	double tmp;
	if (z <= -1.15e+151) {
		tmp = x_m;
	} else if (z <= -1.2e+104) {
		tmp = t_2;
	} else if (z <= -2.8e+61) {
		tmp = t_1;
	} else if (z <= -5.5e-51) {
		tmp = -x_m / (t / z);
	} else if (z <= 7e-7) {
		tmp = (x_m * y) / t;
	} else if (z <= 4e+82) {
		tmp = t_2;
	} 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 + (t / z))
	t_2 = x_m * (-y / z)
	tmp = 0
	if z <= -1.15e+151:
		tmp = x_m
	elif z <= -1.2e+104:
		tmp = t_2
	elif z <= -2.8e+61:
		tmp = t_1
	elif z <= -5.5e-51:
		tmp = -x_m / (t / z)
	elif z <= 7e-7:
		tmp = (x_m * y) / t
	elif z <= 4e+82:
		tmp = t_2
	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(t / z)))
	t_2 = Float64(x_m * Float64(Float64(-y) / z))
	tmp = 0.0
	if (z <= -1.15e+151)
		tmp = x_m;
	elseif (z <= -1.2e+104)
		tmp = t_2;
	elseif (z <= -2.8e+61)
		tmp = t_1;
	elseif (z <= -5.5e-51)
		tmp = Float64(Float64(-x_m) / Float64(t / z));
	elseif (z <= 7e-7)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 4e+82)
		tmp = t_2;
	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 + (t / z));
	t_2 = x_m * (-y / z);
	tmp = 0.0;
	if (z <= -1.15e+151)
		tmp = x_m;
	elseif (z <= -1.2e+104)
		tmp = t_2;
	elseif (z <= -2.8e+61)
		tmp = t_1;
	elseif (z <= -5.5e-51)
		tmp = -x_m / (t / z);
	elseif (z <= 7e-7)
		tmp = (x_m * y) / t;
	elseif (z <= 4e+82)
		tmp = t_2;
	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[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.15e+151], x$95$m, If[LessEqual[z, -1.2e+104], t$95$2, If[LessEqual[z, -2.8e+61], t$95$1, If[LessEqual[z, -5.5e-51], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-7], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4e+82], t$95$2, 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{t}{z}\right)\\
t_2 := x_m \cdot \frac{-y}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{+104}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{-7}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 59.8%

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

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

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

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

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

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

    if -1.15e151 < z < -1.2e104 or 6.99999999999999968e-7 < z < 3.9999999999999999e82

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e104 < z < -2.8000000000000001e61 or 3.9999999999999999e82 < z

    1. Initial program 75.3%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 y around 0 60.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.5%

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub80.5%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. *-inverses80.5%

        \[\leadsto \frac{-x}{\frac{t}{z} - \color{blue}{1}} \]
    7. Simplified80.5%

      \[\leadsto \color{blue}{\frac{-x}{\frac{t}{z} - 1}} \]
    8. Taylor expanded in t around 0 62.8%

      \[\leadsto \color{blue}{x + \frac{t \cdot x}{z}} \]
    9. Step-by-step derivation
      1. *-lft-identity62.8%

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

        \[\leadsto 1 \cdot x + \color{blue}{\frac{t}{\frac{z}{x}}} \]
      3. associate-/r/64.3%

        \[\leadsto 1 \cdot x + \color{blue}{\frac{t}{z} \cdot x} \]
      4. distribute-rgt-in64.4%

        \[\leadsto \color{blue}{x \cdot \left(1 + \frac{t}{z}\right)} \]
    10. Simplified64.4%

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

    if -2.8000000000000001e61 < z < -5.4999999999999997e-51

    1. Initial program 94.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg55.9%

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

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

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

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

    if -5.4999999999999997e-51 < z < 6.99999999999999968e-7

    1. Initial program 94.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+61}:\\ \;\;\;\;x \cdot \left(1 + \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-51}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-7}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + \frac{t}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.8% accurate, 0.5× 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}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+151}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+62}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-51}:\\ \;\;\;\;x_m \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-6}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x_m\\ \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))))
   (*
    x_s
    (if (<= z -1.85e+151)
      x_m
      (if (<= z -1.25e+104)
        t_1
        (if (<= z -2.6e+62)
          x_m
          (if (<= z -1.15e-51)
            (* x_m (/ (- z) t))
            (if (<= z 7e-6) (/ (* x_m y) t) (if (<= z 2e+80) t_1 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 t_1 = x_m * (-y / z);
	double tmp;
	if (z <= -1.85e+151) {
		tmp = x_m;
	} else if (z <= -1.25e+104) {
		tmp = t_1;
	} else if (z <= -2.6e+62) {
		tmp = x_m;
	} else if (z <= -1.15e-51) {
		tmp = x_m * (-z / t);
	} else if (z <= 7e-6) {
		tmp = (x_m * y) / t;
	} else if (z <= 2e+80) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x_m * (-y / z)
    if (z <= (-1.85d+151)) then
        tmp = x_m
    else if (z <= (-1.25d+104)) then
        tmp = t_1
    else if (z <= (-2.6d+62)) then
        tmp = x_m
    else if (z <= (-1.15d-51)) then
        tmp = x_m * (-z / t)
    else if (z <= 7d-6) then
        tmp = (x_m * y) / t
    else if (z <= 2d+80) then
        tmp = t_1
    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 t_1 = x_m * (-y / z);
	double tmp;
	if (z <= -1.85e+151) {
		tmp = x_m;
	} else if (z <= -1.25e+104) {
		tmp = t_1;
	} else if (z <= -2.6e+62) {
		tmp = x_m;
	} else if (z <= -1.15e-51) {
		tmp = x_m * (-z / t);
	} else if (z <= 7e-6) {
		tmp = (x_m * y) / t;
	} else if (z <= 2e+80) {
		tmp = t_1;
	} 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):
	t_1 = x_m * (-y / z)
	tmp = 0
	if z <= -1.85e+151:
		tmp = x_m
	elif z <= -1.25e+104:
		tmp = t_1
	elif z <= -2.6e+62:
		tmp = x_m
	elif z <= -1.15e-51:
		tmp = x_m * (-z / t)
	elif z <= 7e-6:
		tmp = (x_m * y) / t
	elif z <= 2e+80:
		tmp = t_1
	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)
	t_1 = Float64(x_m * Float64(Float64(-y) / z))
	tmp = 0.0
	if (z <= -1.85e+151)
		tmp = x_m;
	elseif (z <= -1.25e+104)
		tmp = t_1;
	elseif (z <= -2.6e+62)
		tmp = x_m;
	elseif (z <= -1.15e-51)
		tmp = Float64(x_m * Float64(Float64(-z) / t));
	elseif (z <= 7e-6)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 2e+80)
		tmp = t_1;
	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)
	t_1 = x_m * (-y / z);
	tmp = 0.0;
	if (z <= -1.85e+151)
		tmp = x_m;
	elseif (z <= -1.25e+104)
		tmp = t_1;
	elseif (z <= -2.6e+62)
		tmp = x_m;
	elseif (z <= -1.15e-51)
		tmp = x_m * (-z / t);
	elseif (z <= 7e-6)
		tmp = (x_m * y) / t;
	elseif (z <= 2e+80)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.85e+151], x$95$m, If[LessEqual[z, -1.25e+104], t$95$1, If[LessEqual[z, -2.6e+62], x$95$m, If[LessEqual[z, -1.15e-51], N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-6], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2e+80], t$95$1, x$95$m]]]]]]), $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}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+151}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{+62}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-51}:\\
\;\;\;\;x_m \cdot \frac{-z}{t}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{-6}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+80}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8499999999999999e151 or -1.2499999999999999e104 < z < -2.59999999999999984e62 or 2e80 < z

    1. Initial program 70.2%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 65.4%

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

    if -1.8499999999999999e151 < z < -1.2499999999999999e104 or 6.99999999999999989e-6 < z < 2e80

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.59999999999999984e62 < z < -1.15000000000000001e-51

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000001e-51 < z < 6.99999999999999989e-6

    1. Initial program 94.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+151}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-6}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.8% accurate, 0.5× 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}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{+62}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-51}:\\ \;\;\;\;\frac{-x_m}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x_m\\ \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))))
   (*
    x_s
    (if (<= z -1.15e+151)
      x_m
      (if (<= z -1.25e+104)
        t_1
        (if (<= z -1.4e+62)
          x_m
          (if (<= z -4e-51)
            (/ (- x_m) (/ t z))
            (if (<= z 2.2e-7)
              (/ (* x_m y) t)
              (if (<= z 2.1e+79) t_1 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 t_1 = x_m * (-y / z);
	double tmp;
	if (z <= -1.15e+151) {
		tmp = x_m;
	} else if (z <= -1.25e+104) {
		tmp = t_1;
	} else if (z <= -1.4e+62) {
		tmp = x_m;
	} else if (z <= -4e-51) {
		tmp = -x_m / (t / z);
	} else if (z <= 2.2e-7) {
		tmp = (x_m * y) / t;
	} else if (z <= 2.1e+79) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x_m * (-y / z)
    if (z <= (-1.15d+151)) then
        tmp = x_m
    else if (z <= (-1.25d+104)) then
        tmp = t_1
    else if (z <= (-1.4d+62)) then
        tmp = x_m
    else if (z <= (-4d-51)) then
        tmp = -x_m / (t / z)
    else if (z <= 2.2d-7) then
        tmp = (x_m * y) / t
    else if (z <= 2.1d+79) then
        tmp = t_1
    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 t_1 = x_m * (-y / z);
	double tmp;
	if (z <= -1.15e+151) {
		tmp = x_m;
	} else if (z <= -1.25e+104) {
		tmp = t_1;
	} else if (z <= -1.4e+62) {
		tmp = x_m;
	} else if (z <= -4e-51) {
		tmp = -x_m / (t / z);
	} else if (z <= 2.2e-7) {
		tmp = (x_m * y) / t;
	} else if (z <= 2.1e+79) {
		tmp = t_1;
	} 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):
	t_1 = x_m * (-y / z)
	tmp = 0
	if z <= -1.15e+151:
		tmp = x_m
	elif z <= -1.25e+104:
		tmp = t_1
	elif z <= -1.4e+62:
		tmp = x_m
	elif z <= -4e-51:
		tmp = -x_m / (t / z)
	elif z <= 2.2e-7:
		tmp = (x_m * y) / t
	elif z <= 2.1e+79:
		tmp = t_1
	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)
	t_1 = Float64(x_m * Float64(Float64(-y) / z))
	tmp = 0.0
	if (z <= -1.15e+151)
		tmp = x_m;
	elseif (z <= -1.25e+104)
		tmp = t_1;
	elseif (z <= -1.4e+62)
		tmp = x_m;
	elseif (z <= -4e-51)
		tmp = Float64(Float64(-x_m) / Float64(t / z));
	elseif (z <= 2.2e-7)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 2.1e+79)
		tmp = t_1;
	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)
	t_1 = x_m * (-y / z);
	tmp = 0.0;
	if (z <= -1.15e+151)
		tmp = x_m;
	elseif (z <= -1.25e+104)
		tmp = t_1;
	elseif (z <= -1.4e+62)
		tmp = x_m;
	elseif (z <= -4e-51)
		tmp = -x_m / (t / z);
	elseif (z <= 2.2e-7)
		tmp = (x_m * y) / t;
	elseif (z <= 2.1e+79)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(x$95$m * N[((-y) / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.15e+151], x$95$m, If[LessEqual[z, -1.25e+104], t$95$1, If[LessEqual[z, -1.4e+62], x$95$m, If[LessEqual[z, -4e-51], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-7], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.1e+79], t$95$1, x$95$m]]]]]]), $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}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.4 \cdot 10^{+62}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -4 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.15e151 or -1.2499999999999999e104 < z < -1.40000000000000007e62 or 2.10000000000000008e79 < z

    1. Initial program 70.2%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 65.4%

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

    if -1.15e151 < z < -1.2499999999999999e104 or 2.2000000000000001e-7 < z < 2.10000000000000008e79

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000007e62 < z < -4e-51

    1. Initial program 94.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg55.9%

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

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

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

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

    if -4e-51 < z < 2.2000000000000001e-7

    1. Initial program 94.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+151}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-51}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.4% accurate, 0.5× 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{z}{z - t}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+102}:\\ \;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-161}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+32}:\\ \;\;\;\;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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (/ z (- z t)))))
   (*
    x_s
    (if (<= z -5.8e+148)
      t_1
      (if (<= z -1.55e+102)
        (* x_m (- 1.0 (/ y z)))
        (if (<= z -4.3e-51)
          t_1
          (if (<= z 2e-161)
            (* (- y z) (/ x_m t))
            (if (<= z 3.6e+32) (* 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 * (z / (z - t));
	double tmp;
	if (z <= -5.8e+148) {
		tmp = t_1;
	} else if (z <= -1.55e+102) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -4.3e-51) {
		tmp = t_1;
	} else if (z <= 2e-161) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 3.6e+32) {
		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 * (z / (z - t))
    if (z <= (-5.8d+148)) then
        tmp = t_1
    else if (z <= (-1.55d+102)) then
        tmp = x_m * (1.0d0 - (y / z))
    else if (z <= (-4.3d-51)) then
        tmp = t_1
    else if (z <= 2d-161) then
        tmp = (y - z) * (x_m / t)
    else if (z <= 3.6d+32) 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 * (z / (z - t));
	double tmp;
	if (z <= -5.8e+148) {
		tmp = t_1;
	} else if (z <= -1.55e+102) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -4.3e-51) {
		tmp = t_1;
	} else if (z <= 2e-161) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 3.6e+32) {
		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 * (z / (z - t))
	tmp = 0
	if z <= -5.8e+148:
		tmp = t_1
	elif z <= -1.55e+102:
		tmp = x_m * (1.0 - (y / z))
	elif z <= -4.3e-51:
		tmp = t_1
	elif z <= 2e-161:
		tmp = (y - z) * (x_m / t)
	elif z <= 3.6e+32:
		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(z / Float64(z - t)))
	tmp = 0.0
	if (z <= -5.8e+148)
		tmp = t_1;
	elseif (z <= -1.55e+102)
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	elseif (z <= -4.3e-51)
		tmp = t_1;
	elseif (z <= 2e-161)
		tmp = Float64(Float64(y - z) * Float64(x_m / t));
	elseif (z <= 3.6e+32)
		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 * (z / (z - t));
	tmp = 0.0;
	if (z <= -5.8e+148)
		tmp = t_1;
	elseif (z <= -1.55e+102)
		tmp = x_m * (1.0 - (y / z));
	elseif (z <= -4.3e-51)
		tmp = t_1;
	elseif (z <= 2e-161)
		tmp = (y - z) * (x_m / t);
	elseif (z <= 3.6e+32)
		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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -5.8e+148], t$95$1, If[LessEqual[z, -1.55e+102], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.3e-51], t$95$1, If[LessEqual[z, 2e-161], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+32], 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 \frac{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.55 \cdot 10^{+102}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-161}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+32}:\\
\;\;\;\;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 < -5.7999999999999999e148 or -1.54999999999999993e102 < z < -4.2999999999999997e-51 or 3.5999999999999997e32 < z

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
      2. frac-2neg81.0%

        \[\leadsto \color{blue}{\frac{-\left(-z\right)}{-\left(t - z\right)}} \cdot x \]
      3. remove-double-neg81.0%

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

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

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

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

        \[\leadsto \frac{z \cdot x}{\left(-t\right) + \color{blue}{z}} \]
    9. Applied egg-rr60.0%

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

        \[\leadsto \color{blue}{\frac{z}{\frac{\left(-t\right) + z}{x}}} \]
      2. associate-/r/81.0%

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

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

        \[\leadsto \frac{z}{\color{blue}{z - t}} \cdot x \]
    11. Simplified81.0%

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

    if -5.7999999999999999e148 < z < -1.54999999999999993e102

    1. Initial program 87.4%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub87.3%

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

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

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

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

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

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

    if -4.2999999999999997e-51 < z < 2.00000000000000006e-161

    1. Initial program 92.9%

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

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

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

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

    if 2.00000000000000006e-161 < z < 3.5999999999999997e32

    1. Initial program 95.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+102}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-161}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+32}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.5% accurate, 0.5× 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{z}{z - t}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+150}:\\ \;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+96}:\\ \;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-162}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+35}:\\ \;\;\;\;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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (/ z (- z t)))))
   (*
    x_s
    (if (<= z -2.65e+150)
      (/ x_m (- 1.0 (/ t z)))
      (if (<= z -1.1e+96)
        (* x_m (- 1.0 (/ y z)))
        (if (<= z -4.6e-52)
          t_1
          (if (<= z 8.5e-162)
            (* (- y z) (/ x_m t))
            (if (<= z 8e+35) (* 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 * (z / (z - t));
	double tmp;
	if (z <= -2.65e+150) {
		tmp = x_m / (1.0 - (t / z));
	} else if (z <= -1.1e+96) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -4.6e-52) {
		tmp = t_1;
	} else if (z <= 8.5e-162) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 8e+35) {
		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 * (z / (z - t))
    if (z <= (-2.65d+150)) then
        tmp = x_m / (1.0d0 - (t / z))
    else if (z <= (-1.1d+96)) then
        tmp = x_m * (1.0d0 - (y / z))
    else if (z <= (-4.6d-52)) then
        tmp = t_1
    else if (z <= 8.5d-162) then
        tmp = (y - z) * (x_m / t)
    else if (z <= 8d+35) 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 * (z / (z - t));
	double tmp;
	if (z <= -2.65e+150) {
		tmp = x_m / (1.0 - (t / z));
	} else if (z <= -1.1e+96) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -4.6e-52) {
		tmp = t_1;
	} else if (z <= 8.5e-162) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 8e+35) {
		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 * (z / (z - t))
	tmp = 0
	if z <= -2.65e+150:
		tmp = x_m / (1.0 - (t / z))
	elif z <= -1.1e+96:
		tmp = x_m * (1.0 - (y / z))
	elif z <= -4.6e-52:
		tmp = t_1
	elif z <= 8.5e-162:
		tmp = (y - z) * (x_m / t)
	elif z <= 8e+35:
		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(z / Float64(z - t)))
	tmp = 0.0
	if (z <= -2.65e+150)
		tmp = Float64(x_m / Float64(1.0 - Float64(t / z)));
	elseif (z <= -1.1e+96)
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	elseif (z <= -4.6e-52)
		tmp = t_1;
	elseif (z <= 8.5e-162)
		tmp = Float64(Float64(y - z) * Float64(x_m / t));
	elseif (z <= 8e+35)
		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 * (z / (z - t));
	tmp = 0.0;
	if (z <= -2.65e+150)
		tmp = x_m / (1.0 - (t / z));
	elseif (z <= -1.1e+96)
		tmp = x_m * (1.0 - (y / z));
	elseif (z <= -4.6e-52)
		tmp = t_1;
	elseif (z <= 8.5e-162)
		tmp = (y - z) * (x_m / t);
	elseif (z <= 8e+35)
		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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.65e+150], N[(x$95$m / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e+96], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-52], t$95$1, If[LessEqual[z, 8.5e-162], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+35], 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 \frac{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+150}:\\
\;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{+96}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+35}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t - z}{z}}} \]
      3. distribute-neg-frac89.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub89.2%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. *-inverses89.2%

        \[\leadsto \frac{-x}{\frac{t}{z} - \color{blue}{1}} \]
    7. Simplified89.2%

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

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

        \[\leadsto \color{blue}{\left(-\left(-x\right)\right) \cdot \frac{1}{-\left(\frac{t}{z} - 1\right)}} \]
      3. remove-double-neg89.1%

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

        \[\leadsto x \cdot \frac{1}{-\color{blue}{\left(\frac{t}{z} + \left(-1\right)\right)}} \]
      5. metadata-eval89.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - \frac{t}{z}}} \]
    11. Simplified89.2%

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

    if -2.65000000000000007e150 < z < -1.0999999999999999e96

    1. Initial program 87.4%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub87.3%

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

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

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

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

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

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

    if -1.0999999999999999e96 < z < -4.59999999999999989e-52 or 7.9999999999999997e35 < z

    1. Initial program 79.6%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 y around 0 77.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
      2. frac-2neg77.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{\left(-t\right) + z}{x}}} \]
      2. associate-/r/77.8%

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

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

        \[\leadsto \frac{z}{\color{blue}{z - t}} \cdot x \]
    11. Simplified77.8%

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

    if -4.59999999999999989e-52 < z < 8.49999999999999955e-162

    1. Initial program 92.9%

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

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

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

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

    if 8.49999999999999955e-162 < z < 7.9999999999999997e35

    1. Initial program 95.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+150}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-52}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-162}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.3% accurate, 0.5× 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{z}{z - t}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+148}:\\ \;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{+103}:\\ \;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-161}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x_m}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+30}:\\ \;\;\;\;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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (/ z (- z t)))))
   (*
    x_s
    (if (<= z -6.4e+148)
      (/ x_m (- 1.0 (/ t z)))
      (if (<= z -1.02e+103)
        (* x_m (- 1.0 (/ y z)))
        (if (<= z -1.7e-51)
          t_1
          (if (<= z 2.7e-161)
            (/ (- y z) (/ t x_m))
            (if (<= z 5e+30) (* 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 * (z / (z - t));
	double tmp;
	if (z <= -6.4e+148) {
		tmp = x_m / (1.0 - (t / z));
	} else if (z <= -1.02e+103) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -1.7e-51) {
		tmp = t_1;
	} else if (z <= 2.7e-161) {
		tmp = (y - z) / (t / x_m);
	} else if (z <= 5e+30) {
		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 * (z / (z - t))
    if (z <= (-6.4d+148)) then
        tmp = x_m / (1.0d0 - (t / z))
    else if (z <= (-1.02d+103)) then
        tmp = x_m * (1.0d0 - (y / z))
    else if (z <= (-1.7d-51)) then
        tmp = t_1
    else if (z <= 2.7d-161) then
        tmp = (y - z) / (t / x_m)
    else if (z <= 5d+30) 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 * (z / (z - t));
	double tmp;
	if (z <= -6.4e+148) {
		tmp = x_m / (1.0 - (t / z));
	} else if (z <= -1.02e+103) {
		tmp = x_m * (1.0 - (y / z));
	} else if (z <= -1.7e-51) {
		tmp = t_1;
	} else if (z <= 2.7e-161) {
		tmp = (y - z) / (t / x_m);
	} else if (z <= 5e+30) {
		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 * (z / (z - t))
	tmp = 0
	if z <= -6.4e+148:
		tmp = x_m / (1.0 - (t / z))
	elif z <= -1.02e+103:
		tmp = x_m * (1.0 - (y / z))
	elif z <= -1.7e-51:
		tmp = t_1
	elif z <= 2.7e-161:
		tmp = (y - z) / (t / x_m)
	elif z <= 5e+30:
		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(z / Float64(z - t)))
	tmp = 0.0
	if (z <= -6.4e+148)
		tmp = Float64(x_m / Float64(1.0 - Float64(t / z)));
	elseif (z <= -1.02e+103)
		tmp = Float64(x_m * Float64(1.0 - Float64(y / z)));
	elseif (z <= -1.7e-51)
		tmp = t_1;
	elseif (z <= 2.7e-161)
		tmp = Float64(Float64(y - z) / Float64(t / x_m));
	elseif (z <= 5e+30)
		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 * (z / (z - t));
	tmp = 0.0;
	if (z <= -6.4e+148)
		tmp = x_m / (1.0 - (t / z));
	elseif (z <= -1.02e+103)
		tmp = x_m * (1.0 - (y / z));
	elseif (z <= -1.7e-51)
		tmp = t_1;
	elseif (z <= 2.7e-161)
		tmp = (y - z) / (t / x_m);
	elseif (z <= 5e+30)
		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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -6.4e+148], N[(x$95$m / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.02e+103], N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-51], t$95$1, If[LessEqual[z, 2.7e-161], N[(N[(y - z), $MachinePrecision] / N[(t / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+30], 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 \frac{z}{z - t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{x_m}{1 - \frac{t}{z}}\\

\mathbf{elif}\;z \leq -1.02 \cdot 10^{+103}:\\
\;\;\;\;x_m \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-161}:\\
\;\;\;\;\frac{y - z}{\frac{t}{x_m}}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+30}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t - z}{z}}} \]
      3. distribute-neg-frac89.2%

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub89.2%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. *-inverses89.2%

        \[\leadsto \frac{-x}{\frac{t}{z} - \color{blue}{1}} \]
    7. Simplified89.2%

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

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

        \[\leadsto \color{blue}{\left(-\left(-x\right)\right) \cdot \frac{1}{-\left(\frac{t}{z} - 1\right)}} \]
      3. remove-double-neg89.1%

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

        \[\leadsto x \cdot \frac{1}{-\color{blue}{\left(\frac{t}{z} + \left(-1\right)\right)}} \]
      5. metadata-eval89.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - \frac{t}{z}}} \]
    11. Simplified89.2%

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

    if -6.3999999999999999e148 < z < -1.01999999999999991e103

    1. Initial program 87.4%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub87.3%

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

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

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

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

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

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

    if -1.01999999999999991e103 < z < -1.70000000000000001e-51 or 4.9999999999999998e30 < z

    1. Initial program 79.6%

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      3. *-commutative99.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 y around 0 77.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
      2. frac-2neg77.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{\left(-t\right) + z}{x}}} \]
      2. associate-/r/77.8%

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

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

        \[\leadsto \frac{z}{\color{blue}{z - t}} \cdot x \]
    11. Simplified77.8%

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

    if -1.70000000000000001e-51 < z < 2.6999999999999999e-161

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

    if 2.6999999999999999e-161 < z < 4.9999999999999998e30

    1. Initial program 95.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+148}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{+103}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-161}:\\ \;\;\;\;\frac{y - z}{\frac{t}{x}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.0% accurate, 0.6× 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{-z}{t}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+63}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x_m\\ \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 (/ (- z) t))))
   (*
    x_s
    (if (<= z -1.8e+63)
      x_m
      (if (<= z -4.6e-51)
        t_1
        (if (<= z 5.2e-45) (/ (* x_m y) t) (if (<= z 1.4e+83) t_1 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 t_1 = x_m * (-z / t);
	double tmp;
	if (z <= -1.8e+63) {
		tmp = x_m;
	} else if (z <= -4.6e-51) {
		tmp = t_1;
	} else if (z <= 5.2e-45) {
		tmp = (x_m * y) / t;
	} else if (z <= 1.4e+83) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x_m * (-z / t)
    if (z <= (-1.8d+63)) then
        tmp = x_m
    else if (z <= (-4.6d-51)) then
        tmp = t_1
    else if (z <= 5.2d-45) then
        tmp = (x_m * y) / t
    else if (z <= 1.4d+83) then
        tmp = t_1
    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 t_1 = x_m * (-z / t);
	double tmp;
	if (z <= -1.8e+63) {
		tmp = x_m;
	} else if (z <= -4.6e-51) {
		tmp = t_1;
	} else if (z <= 5.2e-45) {
		tmp = (x_m * y) / t;
	} else if (z <= 1.4e+83) {
		tmp = t_1;
	} 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):
	t_1 = x_m * (-z / t)
	tmp = 0
	if z <= -1.8e+63:
		tmp = x_m
	elif z <= -4.6e-51:
		tmp = t_1
	elif z <= 5.2e-45:
		tmp = (x_m * y) / t
	elif z <= 1.4e+83:
		tmp = t_1
	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)
	t_1 = Float64(x_m * Float64(Float64(-z) / t))
	tmp = 0.0
	if (z <= -1.8e+63)
		tmp = x_m;
	elseif (z <= -4.6e-51)
		tmp = t_1;
	elseif (z <= 5.2e-45)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 1.4e+83)
		tmp = t_1;
	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)
	t_1 = x_m * (-z / t);
	tmp = 0.0;
	if (z <= -1.8e+63)
		tmp = x_m;
	elseif (z <= -4.6e-51)
		tmp = t_1;
	elseif (z <= 5.2e-45)
		tmp = (x_m * y) / t;
	elseif (z <= 1.4e+83)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.8e+63], x$95$m, If[LessEqual[z, -4.6e-51], t$95$1, If[LessEqual[z, 5.2e-45], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.4e+83], t$95$1, x$95$m]]]]), $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{-z}{t}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+63}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x_m\\


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

    1. Initial program 71.5%

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

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

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

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

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

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

    if -1.79999999999999999e63 < z < -4.60000000000000004e-51 or 5.19999999999999973e-45 < z < 1.4e83

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000004e-51 < z < 5.19999999999999973e-45

    1. Initial program 93.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 58.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 -5.5 \cdot 10^{+59}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-54}:\\ \;\;\;\;x_m \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+82}:\\ \;\;\;\;z \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 -5.5e+59)
    x_m
    (if (<= z -3.2e-54)
      (* x_m (/ (- z) t))
      (if (<= z 4.2e-45)
        (/ (* x_m y) t)
        (if (<= z 3.6e+82) (* z (/ (- 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 <= -5.5e+59) {
		tmp = x_m;
	} else if (z <= -3.2e-54) {
		tmp = x_m * (-z / t);
	} else if (z <= 4.2e-45) {
		tmp = (x_m * y) / t;
	} else if (z <= 3.6e+82) {
		tmp = z * (-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 <= (-5.5d+59)) then
        tmp = x_m
    else if (z <= (-3.2d-54)) then
        tmp = x_m * (-z / t)
    else if (z <= 4.2d-45) then
        tmp = (x_m * y) / t
    else if (z <= 3.6d+82) then
        tmp = z * (-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 <= -5.5e+59) {
		tmp = x_m;
	} else if (z <= -3.2e-54) {
		tmp = x_m * (-z / t);
	} else if (z <= 4.2e-45) {
		tmp = (x_m * y) / t;
	} else if (z <= 3.6e+82) {
		tmp = z * (-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 <= -5.5e+59:
		tmp = x_m
	elif z <= -3.2e-54:
		tmp = x_m * (-z / t)
	elif z <= 4.2e-45:
		tmp = (x_m * y) / t
	elif z <= 3.6e+82:
		tmp = z * (-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 <= -5.5e+59)
		tmp = x_m;
	elseif (z <= -3.2e-54)
		tmp = Float64(x_m * Float64(Float64(-z) / t));
	elseif (z <= 4.2e-45)
		tmp = Float64(Float64(x_m * y) / t);
	elseif (z <= 3.6e+82)
		tmp = Float64(z * Float64(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 <= -5.5e+59)
		tmp = x_m;
	elseif (z <= -3.2e-54)
		tmp = x_m * (-z / t);
	elseif (z <= 4.2e-45)
		tmp = (x_m * y) / t;
	elseif (z <= 3.6e+82)
		tmp = z * (-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, -5.5e+59], x$95$m, If[LessEqual[z, -3.2e-54], N[(x$95$m * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-45], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.6e+82], N[(z * 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 -5.5 \cdot 10^{+59}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-54}:\\
\;\;\;\;x_m \cdot \frac{-z}{t}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+82}:\\
\;\;\;\;z \cdot \frac{-x_m}{t}\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.4999999999999999e59 or 3.60000000000000014e82 < z

    1. Initial program 71.5%

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

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

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

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

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

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

    if -5.4999999999999999e59 < z < -3.19999999999999998e-54

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999998e-54 < z < 4.1999999999999999e-45

    1. Initial program 93.9%

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

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

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

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

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

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

    if 4.1999999999999999e-45 < z < 3.60000000000000014e82

    1. Initial program 88.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg39.3%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg39.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+59}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+82}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.4% accurate, 0.7× 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 -7.2 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{-x_m}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{x_m \cdot y}{t}\\ \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 -7.2e+50)
      t_1
      (if (<= z -2.2e-55)
        (/ (- x_m) (/ t z))
        (if (<= z 2.5e-8) (/ (* x_m y) t) 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 <= -7.2e+50) {
		tmp = t_1;
	} else if (z <= -2.2e-55) {
		tmp = -x_m / (t / z);
	} else if (z <= 2.5e-8) {
		tmp = (x_m * y) / t;
	} 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 <= (-7.2d+50)) then
        tmp = t_1
    else if (z <= (-2.2d-55)) then
        tmp = -x_m / (t / z)
    else if (z <= 2.5d-8) then
        tmp = (x_m * y) / t
    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 <= -7.2e+50) {
		tmp = t_1;
	} else if (z <= -2.2e-55) {
		tmp = -x_m / (t / z);
	} else if (z <= 2.5e-8) {
		tmp = (x_m * y) / t;
	} 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 <= -7.2e+50:
		tmp = t_1
	elif z <= -2.2e-55:
		tmp = -x_m / (t / z)
	elif z <= 2.5e-8:
		tmp = (x_m * y) / t
	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 <= -7.2e+50)
		tmp = t_1;
	elseif (z <= -2.2e-55)
		tmp = Float64(Float64(-x_m) / Float64(t / z));
	elseif (z <= 2.5e-8)
		tmp = Float64(Float64(x_m * y) / t);
	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 <= -7.2e+50)
		tmp = t_1;
	elseif (z <= -2.2e-55)
		tmp = -x_m / (t / z);
	elseif (z <= 2.5e-8)
		tmp = (x_m * y) / t;
	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, -7.2e+50], t$95$1, If[LessEqual[z, -2.2e-55], N[((-x$95$m) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-8], N[(N[(x$95$m * y), $MachinePrecision] / t), $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 -7.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x_m}{\frac{t}{z}}\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.19999999999999972e50 or 2.4999999999999999e-8 < z

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999972e50 < z < -2.2e-55

    1. Initial program 94.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg56.4%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{z}}} \]
      3. distribute-neg-frac62.0%

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

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

    if -2.2e-55 < z < 2.4999999999999999e-8

    1. Initial program 94.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-55}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.3% accurate, 0.7× 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.22 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\ \;\;\;\;x_m \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;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 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 -1.22e+64)
      t_1
      (if (<= z -1.1e-163)
        (* x_m (/ (- y z) t))
        (if (<= z 3.5e+82) (* 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 <= -1.22e+64) {
		tmp = t_1;
	} else if (z <= -1.1e-163) {
		tmp = x_m * ((y - z) / t);
	} else if (z <= 3.5e+82) {
		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 <= (-1.22d+64)) then
        tmp = t_1
    else if (z <= (-1.1d-163)) then
        tmp = x_m * ((y - z) / t)
    else if (z <= 3.5d+82) 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 <= -1.22e+64) {
		tmp = t_1;
	} else if (z <= -1.1e-163) {
		tmp = x_m * ((y - z) / t);
	} else if (z <= 3.5e+82) {
		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 <= -1.22e+64:
		tmp = t_1
	elif z <= -1.1e-163:
		tmp = x_m * ((y - z) / t)
	elif z <= 3.5e+82:
		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 <= -1.22e+64)
		tmp = t_1;
	elseif (z <= -1.1e-163)
		tmp = Float64(x_m * Float64(Float64(y - z) / t));
	elseif (z <= 3.5e+82)
		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 <= -1.22e+64)
		tmp = t_1;
	elseif (z <= -1.1e-163)
		tmp = x_m * ((y - z) / t);
	elseif (z <= 3.5e+82)
		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, -1.22e+64], t$95$1, If[LessEqual[z, -1.1e-163], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+82], 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 -1.22 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\
\;\;\;\;x_m \cdot \frac{y - z}{t}\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.21999999999999994e64 or 3.5e82 < z

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.21999999999999994e64 < z < -1.10000000000000005e-163

    1. Initial program 95.6%

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

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

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

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

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

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

    if -1.10000000000000005e-163 < z < 3.5e82

    1. Initial program 92.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 73.3% accurate, 0.7× 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 -6 \cdot 10^{+65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-161}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;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 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 -6e+65)
      t_1
      (if (<= z 1.45e-161)
        (* (- y z) (/ x_m t))
        (if (<= z 3.5e+82) (* 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 <= -6e+65) {
		tmp = t_1;
	} else if (z <= 1.45e-161) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 3.5e+82) {
		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 <= (-6d+65)) then
        tmp = t_1
    else if (z <= 1.45d-161) then
        tmp = (y - z) * (x_m / t)
    else if (z <= 3.5d+82) 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 <= -6e+65) {
		tmp = t_1;
	} else if (z <= 1.45e-161) {
		tmp = (y - z) * (x_m / t);
	} else if (z <= 3.5e+82) {
		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 <= -6e+65:
		tmp = t_1
	elif z <= 1.45e-161:
		tmp = (y - z) * (x_m / t)
	elif z <= 3.5e+82:
		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 <= -6e+65)
		tmp = t_1;
	elseif (z <= 1.45e-161)
		tmp = Float64(Float64(y - z) * Float64(x_m / t));
	elseif (z <= 3.5e+82)
		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 <= -6e+65)
		tmp = t_1;
	elseif (z <= 1.45e-161)
		tmp = (y - z) * (x_m / t);
	elseif (z <= 3.5e+82)
		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, -6e+65], t$95$1, If[LessEqual[z, 1.45e-161], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+82], 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 -6 \cdot 10^{+65}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-161}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x_m}{t}\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;x_m \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.0000000000000004e65 or 3.5e82 < z

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000004e65 < z < 1.45e-161

    1. Initial program 93.4%

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

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

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

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

    if 1.45e-161 < z < 3.5e82

    1. Initial program 92.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-161}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.8% accurate, 0.8× 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 -7.8 \cdot 10^{+63} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -7.8e+63) (not (<= z 3.5e+82)))
    (* 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 <= -7.8e+63) || !(z <= 3.5e+82)) {
		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 <= (-7.8d+63)) .or. (.not. (z <= 3.5d+82))) 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 <= -7.8e+63) || !(z <= 3.5e+82)) {
		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 <= -7.8e+63) or not (z <= 3.5e+82):
		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 <= -7.8e+63) || !(z <= 3.5e+82))
		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 <= -7.8e+63) || ~((z <= 3.5e+82)))
		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, -7.8e+63], N[Not[LessEqual[z, 3.5e+82]], $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 -7.8 \cdot 10^{+63} \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\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 < -7.8e63 or 3.5e82 < z

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8e63 < z < 3.5e82

    1. Initial program 93.2%

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

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

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

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

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

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

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

Alternative 14: 96.2% accurate, 0.8× 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.9 \cdot 10^{-69}:\\ \;\;\;\;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 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 3.9e-69)
    (* 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 <= 3.9e-69) {
		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 <= 3.9d-69) 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 <= 3.9e-69) {
		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 <= 3.9e-69:
		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 <= 3.9e-69)
		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 <= 3.9e-69)
		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, 3.9e-69], 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 3.9 \cdot 10^{-69}:\\
\;\;\;\;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 < 3.89999999999999981e-69

    1. Initial program 84.6%

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

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

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

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

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

    if 3.89999999999999981e-69 < x

    1. Initial program 84.0%

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

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

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

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

Alternative 15: 61.5% accurate, 1.0× 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.6 \cdot 10^{+54}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{+46}:\\ \;\;\;\;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 -6.6e+54) x_m (if (<= z 2.06e+46) (* 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 <= -6.6e+54) {
		tmp = x_m;
	} else if (z <= 2.06e+46) {
		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 <= (-6.6d+54)) then
        tmp = x_m
    else if (z <= 2.06d+46) 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 <= -6.6e+54) {
		tmp = x_m;
	} else if (z <= 2.06e+46) {
		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 <= -6.6e+54:
		tmp = x_m
	elif z <= 2.06e+46:
		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 <= -6.6e+54)
		tmp = x_m;
	elseif (z <= 2.06e+46)
		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 <= -6.6e+54)
		tmp = x_m;
	elseif (z <= 2.06e+46)
		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, -6.6e+54], x$95$m, If[LessEqual[z, 2.06e+46], 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 -6.6 \cdot 10^{+54}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq 2.06 \cdot 10^{+46}:\\
\;\;\;\;x_m \cdot \frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.6e54 or 2.0600000000000001e46 < z

    1. Initial program 71.7%

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

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

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

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

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

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

    if -6.6e54 < z < 2.0600000000000001e46

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.06 \cdot 10^{+46}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.6% accurate, 1.0× 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.95 \cdot 10^{+54}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+43}:\\ \;\;\;\;\frac{x_m}{\frac{t}{y}}\\ \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.95e+54) x_m (if (<= z 2.8e+43) (/ x_m (/ t y)) 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.95e+54) {
		tmp = x_m;
	} else if (z <= 2.8e+43) {
		tmp = x_m / (t / y);
	} 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.95d+54)) then
        tmp = x_m
    else if (z <= 2.8d+43) then
        tmp = x_m / (t / y)
    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.95e+54) {
		tmp = x_m;
	} else if (z <= 2.8e+43) {
		tmp = x_m / (t / y);
	} 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.95e+54:
		tmp = x_m
	elif z <= 2.8e+43:
		tmp = x_m / (t / y)
	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.95e+54)
		tmp = x_m;
	elseif (z <= 2.8e+43)
		tmp = Float64(x_m / Float64(t / y));
	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.95e+54)
		tmp = x_m;
	elseif (z <= 2.8e+43)
		tmp = x_m / (t / y);
	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.95e+54], x$95$m, If[LessEqual[z, 2.8e+43], N[(x$95$m / N[(t / y), $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.95 \cdot 10^{+54}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{x_m}{\frac{t}{y}}\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9500000000000001e54 or 2.80000000000000019e43 < z

    1. Initial program 71.7%

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

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

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

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

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

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

    if -1.9500000000000001e54 < z < 2.80000000000000019e43

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+43}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 60.3% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+55}:\\ \;\;\;\;x_m\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+41}:\\ \;\;\;\;\frac{x_m \cdot 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 -9e+55) x_m (if (<= z 6.2e+41) (/ (* 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 <= -9e+55) {
		tmp = x_m;
	} else if (z <= 6.2e+41) {
		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 <= (-9d+55)) then
        tmp = x_m
    else if (z <= 6.2d+41) 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 <= -9e+55) {
		tmp = x_m;
	} else if (z <= 6.2e+41) {
		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 <= -9e+55:
		tmp = x_m
	elif z <= 6.2e+41:
		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 <= -9e+55)
		tmp = x_m;
	elseif (z <= 6.2e+41)
		tmp = Float64(Float64(x_m * 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 <= -9e+55)
		tmp = x_m;
	elseif (z <= 6.2e+41)
		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, -9e+55], x$95$m, If[LessEqual[z, 6.2e+41], N[(N[(x$95$m * y), $MachinePrecision] / t), $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 -9 \cdot 10^{+55}:\\
\;\;\;\;x_m\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+41}:\\
\;\;\;\;\frac{x_m \cdot y}{t}\\

\mathbf{else}:\\
\;\;\;\;x_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.99999999999999996e55 or 6.2e41 < z

    1. Initial program 71.7%

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

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

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

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

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

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

    if -8.99999999999999996e55 < z < 6.2e41

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+41}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 97.0% 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 84.4%

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

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

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

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

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

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

Alternative 19: 35.5% 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 84.4%

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification30.8%

    \[\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 2024010 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

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