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

Percentage Accurate: 84.6% → 97.0%
Time: 10.6s
Alternatives: 9
Speedup: 0.7×

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 9 alternatives:

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

Initial Program: 84.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -4.9999999999999996e-78

    1. Initial program 77.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      7. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      11. lower-/.f6496.5

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

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

    if -4.9999999999999996e-78 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 83.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      6. lift-*.f64N/A

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

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
      8. clear-numN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      9. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
      11. lower-/.f6496.4

        \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
    4. Applied rewrites96.4%

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

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

Alternative 2: 97.1% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -4.9999999999999996e-78

    1. Initial program 77.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      7. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      11. lower-/.f6496.5

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

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

    if -4.9999999999999996e-78 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 83.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      6. lift-*.f64N/A

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

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
      8. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      10. lower-/.f6495.9

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

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

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

Alternative 3: 59.4% accurate, 0.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+64}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-67}:\\ \;\;\;\;y \cdot \frac{x\_m}{-z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -5.5e+64)
    x_m
    (if (<= z -3.4e-67)
      (* y (/ x_m (- z)))
      (if (<= z 4.4e+64) (* y (/ x_m t)) (fma x_m (/ t z) 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+64) {
		tmp = x_m;
	} else if (z <= -3.4e-67) {
		tmp = y * (x_m / -z);
	} else if (z <= 4.4e+64) {
		tmp = y * (x_m / t);
	} else {
		tmp = fma(x_m, (t / z), 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+64)
		tmp = x_m;
	elseif (z <= -3.4e-67)
		tmp = Float64(y * Float64(x_m / Float64(-z)));
	elseif (z <= 4.4e+64)
		tmp = Float64(y * Float64(x_m / t));
	else
		tmp = fma(x_m, Float64(t / z), x_m);
	end
	return Float64(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+64], x$95$m, If[LessEqual[z, -3.4e-67], N[(y * N[(x$95$m / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+64], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(t / z), $MachinePrecision] + x$95$m), $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 -5.5 \cdot 10^{+64}:\\
\;\;\;\;x\_m\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-67}:\\
\;\;\;\;y \cdot \frac{x\_m}{-z}\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.4999999999999996e64

    1. Initial program 67.1%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
      6. lift-*.f64N/A

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

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
      8. clear-numN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      9. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
      10. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
      11. lower-/.f6499.9

        \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
    4. Applied rewrites99.9%

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

      \[\leadsto \frac{x}{\color{blue}{1}} \]
    6. Step-by-step derivation
      1. Applied rewrites70.0%

        \[\leadsto \frac{x}{\color{blue}{1}} \]
      2. Step-by-step derivation
        1. /-rgt-identity70.0

          \[\leadsto \color{blue}{x} \]
      3. Applied rewrites70.0%

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

      if -5.4999999999999996e64 < z < -3.4000000000000001e-67

      1. Initial program 93.2%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Taylor expanded in t around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
        2. neg-sub0N/A

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

          \[\leadsto 0 - \color{blue}{x \cdot \frac{y - z}{z}} \]
        4. div-subN/A

          \[\leadsto 0 - x \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
        5. sub-negN/A

          \[\leadsto 0 - x \cdot \color{blue}{\left(\frac{y}{z} + \left(\mathsf{neg}\left(\frac{z}{z}\right)\right)\right)} \]
        6. *-inversesN/A

          \[\leadsto 0 - x \cdot \left(\frac{y}{z} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto 0 - x \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
        8. distribute-rgt-inN/A

          \[\leadsto 0 - \color{blue}{\left(\frac{y}{z} \cdot x + -1 \cdot x\right)} \]
        9. *-commutativeN/A

          \[\leadsto 0 - \left(\color{blue}{x \cdot \frac{y}{z}} + -1 \cdot x\right) \]
        10. associate-/l*N/A

          \[\leadsto 0 - \left(\color{blue}{\frac{x \cdot y}{z}} + -1 \cdot x\right) \]
        11. mul-1-negN/A

          \[\leadsto 0 - \left(\frac{x \cdot y}{z} + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
        12. unsub-negN/A

          \[\leadsto 0 - \color{blue}{\left(\frac{x \cdot y}{z} - x\right)} \]
        13. associate-+l-N/A

          \[\leadsto \color{blue}{\left(0 - \frac{x \cdot y}{z}\right) + x} \]
        14. neg-sub0N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)} + x \]
        15. mul-1-negN/A

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} + x \]
        16. +-commutativeN/A

          \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{z}} \]
        17. mul-1-negN/A

          \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)} \]
        18. unsub-negN/A

          \[\leadsto \color{blue}{x - \frac{x \cdot y}{z}} \]
        19. lower--.f64N/A

          \[\leadsto \color{blue}{x - \frac{x \cdot y}{z}} \]
        20. *-commutativeN/A

          \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
        21. associate-/l*N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        22. lower-*.f64N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        23. lower-/.f6464.9

          \[\leadsto x - y \cdot \color{blue}{\frac{x}{z}} \]
      5. Applied rewrites64.9%

        \[\leadsto \color{blue}{x - y \cdot \frac{x}{z}} \]
      6. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto x - y \cdot \color{blue}{\frac{x}{z}} \]
        2. lift-*.f64N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        3. sub-negN/A

          \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(y \cdot \frac{x}{z}\right)\right)} \]
        4. +-commutativeN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y \cdot \frac{x}{z}\right)\right) + x} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{x}{z}}\right)\right) + x \]
        6. distribute-lft-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right) \cdot \frac{x}{z}} + x \]
        7. lift-/.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\frac{x}{z}} + x \]
        8. clear-numN/A

          \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\frac{1}{\frac{z}{x}}} + x \]
        9. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(y\right)\right) \cdot 1}{\frac{z}{x}}} + x \]
        10. div-invN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(y\right)\right) \cdot 1}{\color{blue}{z \cdot \frac{1}{x}}} + x \]
        11. times-fracN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(y\right)}{z} \cdot \frac{1}{\frac{1}{x}}} + x \]
        12. remove-double-divN/A

          \[\leadsto \frac{\mathsf{neg}\left(y\right)}{z} \cdot \color{blue}{x} + x \]
        13. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\mathsf{neg}\left(y\right)}{z}, x, x\right)} \]
        14. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(y\right)}{z}}, x, x\right) \]
        15. lower-neg.f6461.8

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-y}}{z}, x, x\right) \]
      7. Applied rewrites61.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-y}{z}, x, x\right)} \]
      8. Taylor expanded in y around inf

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
      9. Step-by-step derivation
        1. associate-*l/N/A

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

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{x}{z}\right) \cdot y} \]
        3. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{x}{z}\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{x}{z}\right)} \]
        5. mul-1-negN/A

          \[\leadsto y \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{z}\right)\right)} \]
        6. distribute-neg-frac2N/A

          \[\leadsto y \cdot \color{blue}{\frac{x}{\mathsf{neg}\left(z\right)}} \]
        7. mul-1-negN/A

          \[\leadsto y \cdot \frac{x}{\color{blue}{-1 \cdot z}} \]
        8. lower-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{x}{-1 \cdot z}} \]
        9. mul-1-negN/A

          \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{neg}\left(z\right)}} \]
        10. lower-neg.f6450.9

          \[\leadsto y \cdot \frac{x}{\color{blue}{-z}} \]
      10. Applied rewrites50.9%

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

      if -3.4000000000000001e-67 < z < 4.40000000000000004e64

      1. Initial program 85.4%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
        2. lower-*.f6460.3

          \[\leadsto \frac{\color{blue}{x \cdot y}}{t} \]
      5. Applied rewrites60.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
        3. lower-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
        4. lower-/.f6469.4

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

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

      if 4.40000000000000004e64 < z

      1. Initial program 76.9%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        3. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
        4. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
        5. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        6. lift-*.f64N/A

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

          \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
        8. clear-numN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
        9. un-div-invN/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        11. lower-/.f6499.8

          \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
      4. Applied rewrites99.8%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot z}{t - z}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        3. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\left(t + \color{blue}{-1 \cdot z}\right)\right)} \]
        5. +-commutativeN/A

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

          \[\leadsto \frac{x \cdot z}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
        7. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(t\right)\right)} \]
        8. remove-double-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
        9. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z - t}} \]
        10. associate-/l*N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        12. lower-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{z}{z - t}} \]
        13. lower--.f6491.8

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

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

        \[\leadsto \color{blue}{x + \frac{t \cdot x}{z}} \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{t \cdot x}{z} + x} \]
        2. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{x \cdot t}}{z} + x \]
        3. associate-/l*N/A

          \[\leadsto \color{blue}{x \cdot \frac{t}{z}} + x \]
        4. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
        5. lower-/.f6474.0

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{t}{z}}, x\right) \]
      10. Applied rewrites74.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
    7. Recombined 4 regimes into one program.
    8. Add Preprocessing

    Alternative 4: 89.4% accurate, 0.7× 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^{+187}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{-z}, x\_m, x\_m\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{z}{z - t}\\ \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y z t)
     :precision binary64
     (*
      x_s
      (if (<= z -9e+187)
        (fma (/ y (- z)) x_m x_m)
        (if (<= z 5e+80) (* (- y z) (/ x_m (- t z))) (* x_m (/ z (- z t)))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    double code(double x_s, double x_m, double y, double z, double t) {
    	double tmp;
    	if (z <= -9e+187) {
    		tmp = fma((y / -z), x_m, x_m);
    	} else if (z <= 5e+80) {
    		tmp = (y - z) * (x_m / (t - z));
    	} else {
    		tmp = x_m * (z / (z - t));
    	}
    	return x_s * tmp;
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    function code(x_s, x_m, y, z, t)
    	tmp = 0.0
    	if (z <= -9e+187)
    		tmp = fma(Float64(y / Float64(-z)), x_m, x_m);
    	elseif (z <= 5e+80)
    		tmp = Float64(Float64(y - z) * Float64(x_m / Float64(t - z)));
    	else
    		tmp = Float64(x_m * Float64(z / Float64(z - t)));
    	end
    	return Float64(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+187], N[(N[(y / (-z)), $MachinePrecision] * x$95$m + x$95$m), $MachinePrecision], If[LessEqual[z, 5e+80], N[(N[(y - z), $MachinePrecision] * N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;z \leq -9 \cdot 10^{+187}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{-z}, x\_m, x\_m\right)\\
    
    \mathbf{elif}\;z \leq 5 \cdot 10^{+80}:\\
    \;\;\;\;\left(y - z\right) \cdot \frac{x\_m}{t - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\_m \cdot \frac{z}{z - t}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -9.00000000000000052e187

      1. Initial program 57.6%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Taylor expanded in t around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \left(y - z\right)}{z}\right)} \]
        2. neg-sub0N/A

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

          \[\leadsto 0 - \color{blue}{x \cdot \frac{y - z}{z}} \]
        4. div-subN/A

          \[\leadsto 0 - x \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
        5. sub-negN/A

          \[\leadsto 0 - x \cdot \color{blue}{\left(\frac{y}{z} + \left(\mathsf{neg}\left(\frac{z}{z}\right)\right)\right)} \]
        6. *-inversesN/A

          \[\leadsto 0 - x \cdot \left(\frac{y}{z} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto 0 - x \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
        8. distribute-rgt-inN/A

          \[\leadsto 0 - \color{blue}{\left(\frac{y}{z} \cdot x + -1 \cdot x\right)} \]
        9. *-commutativeN/A

          \[\leadsto 0 - \left(\color{blue}{x \cdot \frac{y}{z}} + -1 \cdot x\right) \]
        10. associate-/l*N/A

          \[\leadsto 0 - \left(\color{blue}{\frac{x \cdot y}{z}} + -1 \cdot x\right) \]
        11. mul-1-negN/A

          \[\leadsto 0 - \left(\frac{x \cdot y}{z} + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
        12. unsub-negN/A

          \[\leadsto 0 - \color{blue}{\left(\frac{x \cdot y}{z} - x\right)} \]
        13. associate-+l-N/A

          \[\leadsto \color{blue}{\left(0 - \frac{x \cdot y}{z}\right) + x} \]
        14. neg-sub0N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)} + x \]
        15. mul-1-negN/A

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{z}} + x \]
        16. +-commutativeN/A

          \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{z}} \]
        17. mul-1-negN/A

          \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot y}{z}\right)\right)} \]
        18. unsub-negN/A

          \[\leadsto \color{blue}{x - \frac{x \cdot y}{z}} \]
        19. lower--.f64N/A

          \[\leadsto \color{blue}{x - \frac{x \cdot y}{z}} \]
        20. *-commutativeN/A

          \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
        21. associate-/l*N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        22. lower-*.f64N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        23. lower-/.f6492.4

          \[\leadsto x - y \cdot \color{blue}{\frac{x}{z}} \]
      5. Applied rewrites92.4%

        \[\leadsto \color{blue}{x - y \cdot \frac{x}{z}} \]
      6. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto x - y \cdot \color{blue}{\frac{x}{z}} \]
        2. lift-*.f64N/A

          \[\leadsto x - \color{blue}{y \cdot \frac{x}{z}} \]
        3. sub-negN/A

          \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(y \cdot \frac{x}{z}\right)\right)} \]
        4. +-commutativeN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y \cdot \frac{x}{z}\right)\right) + x} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{x}{z}}\right)\right) + x \]
        6. distribute-lft-neg-inN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(y\right)\right) \cdot \frac{x}{z}} + x \]
        7. lift-/.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\frac{x}{z}} + x \]
        8. clear-numN/A

          \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\frac{1}{\frac{z}{x}}} + x \]
        9. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(y\right)\right) \cdot 1}{\frac{z}{x}}} + x \]
        10. div-invN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(y\right)\right) \cdot 1}{\color{blue}{z \cdot \frac{1}{x}}} + x \]
        11. times-fracN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(y\right)}{z} \cdot \frac{1}{\frac{1}{x}}} + x \]
        12. remove-double-divN/A

          \[\leadsto \frac{\mathsf{neg}\left(y\right)}{z} \cdot \color{blue}{x} + x \]
        13. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\mathsf{neg}\left(y\right)}{z}, x, x\right)} \]
        14. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\mathsf{neg}\left(y\right)}{z}}, x, x\right) \]
        15. lower-neg.f6495.4

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-y}}{z}, x, x\right) \]
      7. Applied rewrites95.4%

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

      if -9.00000000000000052e187 < z < 4.99999999999999961e80

      1. Initial program 85.5%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        3. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
        4. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
        5. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        7. *-commutativeN/A

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

          \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{x}{t - z}} \]
        9. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
        11. lower-/.f6495.3

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

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

      if 4.99999999999999961e80 < z

      1. Initial program 75.9%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        3. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
        4. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
        5. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        6. lift-*.f64N/A

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

          \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
        8. clear-numN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
        9. un-div-invN/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        11. lower-/.f6499.8

          \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
      4. Applied rewrites99.8%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot z}{t - z}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        3. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\left(t + \color{blue}{-1 \cdot z}\right)\right)} \]
        5. +-commutativeN/A

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

          \[\leadsto \frac{x \cdot z}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
        7. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(t\right)\right)} \]
        8. remove-double-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
        9. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z - t}} \]
        10. associate-/l*N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        12. lower-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{z}{z - t}} \]
        13. lower--.f6493.4

          \[\leadsto x \cdot \frac{z}{\color{blue}{z - t}} \]
      7. Applied rewrites93.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+187}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{-z}, x, x\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+80}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 75.1% 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 \frac{z}{z - t}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+60}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y z t)
     :precision binary64
     (let* ((t_1 (* x_m (/ z (- z t)))))
       (*
        x_s
        (if (<= z -5.2e+64) t_1 (if (<= z 4.5e+60) (* 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.2e+64) {
    		tmp = t_1;
    	} else if (z <= 4.5e+60) {
    		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.2d+64)) then
            tmp = t_1
        else if (z <= 4.5d+60) 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.2e+64) {
    		tmp = t_1;
    	} else if (z <= 4.5e+60) {
    		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.2e+64:
    		tmp = t_1
    	elif z <= 4.5e+60:
    		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.2e+64)
    		tmp = t_1;
    	elseif (z <= 4.5e+60)
    		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.2e+64)
    		tmp = t_1;
    	elseif (z <= 4.5e+60)
    		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.2e+64], t$95$1, If[LessEqual[z, 4.5e+60], 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.2 \cdot 10^{+64}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 4.5 \cdot 10^{+60}:\\
    \;\;\;\;x\_m \cdot \frac{y}{t - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -5.19999999999999994e64 or 4.50000000000000013e60 < z

      1. Initial program 72.8%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        3. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
        4. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
        5. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        6. lift-*.f64N/A

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

          \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
        8. clear-numN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
        9. un-div-invN/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        11. lower-/.f6499.8

          \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
      4. Applied rewrites99.8%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot z}{t - z}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        3. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\left(t + \color{blue}{-1 \cdot z}\right)\right)} \]
        5. +-commutativeN/A

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

          \[\leadsto \frac{x \cdot z}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
        7. mul-1-negN/A

          \[\leadsto \frac{x \cdot z}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(t\right)\right)} \]
        8. remove-double-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
        9. sub-negN/A

          \[\leadsto \frac{x \cdot z}{\color{blue}{z - t}} \]
        10. associate-/l*N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
        12. lower-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{z}{z - t}} \]
        13. lower--.f6489.1

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

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

      if -5.19999999999999994e64 < z < 4.50000000000000013e60

      1. Initial program 86.7%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

          \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
        3. lower-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{y}{t - z}} \]
        4. lower--.f6478.9

          \[\leadsto x \cdot \frac{y}{\color{blue}{t - z}} \]
      5. Applied rewrites78.9%

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

    Alternative 6: 69.5% accurate, 0.7× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+72}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+66}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\ \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y z t)
     :precision binary64
     (*
      x_s
      (if (<= z -3e+72)
        x_m
        (if (<= z 3.5e+66) (* x_m (/ y (- t z))) (fma x_m (/ t z) 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 <= -3e+72) {
    		tmp = x_m;
    	} else if (z <= 3.5e+66) {
    		tmp = x_m * (y / (t - z));
    	} else {
    		tmp = fma(x_m, (t / z), 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 <= -3e+72)
    		tmp = x_m;
    	elseif (z <= 3.5e+66)
    		tmp = Float64(x_m * Float64(y / Float64(t - z)));
    	else
    		tmp = fma(x_m, Float64(t / z), x_m);
    	end
    	return Float64(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, -3e+72], x$95$m, If[LessEqual[z, 3.5e+66], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(t / z), $MachinePrecision] + x$95$m), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;z \leq -3 \cdot 10^{+72}:\\
    \;\;\;\;x\_m\\
    
    \mathbf{elif}\;z \leq 3.5 \cdot 10^{+66}:\\
    \;\;\;\;x\_m \cdot \frac{y}{t - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -3.00000000000000003e72

      1. Initial program 67.1%

        \[\frac{x \cdot \left(y - z\right)}{t - z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        3. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
        4. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
        5. remove-double-negN/A

          \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
        6. lift-*.f64N/A

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

          \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
        8. clear-numN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
        9. un-div-invN/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        10. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
        11. lower-/.f6499.9

          \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
      4. Applied rewrites99.9%

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

        \[\leadsto \frac{x}{\color{blue}{1}} \]
      6. Step-by-step derivation
        1. Applied rewrites70.0%

          \[\leadsto \frac{x}{\color{blue}{1}} \]
        2. Step-by-step derivation
          1. /-rgt-identity70.0

            \[\leadsto \color{blue}{x} \]
        3. Applied rewrites70.0%

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

        if -3.00000000000000003e72 < z < 3.4999999999999997e66

        1. Initial program 86.8%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

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

            \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{y}{t - z}} \]
          3. lower-/.f64N/A

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

            \[\leadsto x \cdot \frac{y}{\color{blue}{t - z}} \]
        5. Applied rewrites78.4%

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

        if 3.4999999999999997e66 < z

        1. Initial program 76.9%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift--.f64N/A

            \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
          3. remove-double-negN/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
          4. lift--.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
          5. remove-double-negN/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
          6. lift-*.f64N/A

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

            \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
          8. clear-numN/A

            \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
          9. un-div-invN/A

            \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
          11. lower-/.f6499.8

            \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
        4. Applied rewrites99.8%

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

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot z}{t - z}\right)} \]
          2. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
          3. sub-negN/A

            \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
          4. mul-1-negN/A

            \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\left(t + \color{blue}{-1 \cdot z}\right)\right)} \]
          5. +-commutativeN/A

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

            \[\leadsto \frac{x \cdot z}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
          7. mul-1-negN/A

            \[\leadsto \frac{x \cdot z}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(t\right)\right)} \]
          8. remove-double-negN/A

            \[\leadsto \frac{x \cdot z}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
          9. sub-negN/A

            \[\leadsto \frac{x \cdot z}{\color{blue}{z - t}} \]
          10. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
          12. lower-/.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{z}{z - t}} \]
          13. lower--.f6491.8

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

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

          \[\leadsto \color{blue}{x + \frac{t \cdot x}{z}} \]
        9. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{t \cdot x}{z} + x} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{x \cdot t}}{z} + x \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{t}{z}} + x \]
          4. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
          5. lower-/.f6474.0

            \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{t}{z}}, x\right) \]
        10. Applied rewrites74.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 7: 59.4% 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 -3.2 \cdot 10^{+71}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\ \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m y z t)
       :precision binary64
       (*
        x_s
        (if (<= z -3.2e+71)
          x_m
          (if (<= z 4.4e+64) (* y (/ x_m t)) (fma x_m (/ t z) 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 <= -3.2e+71) {
      		tmp = x_m;
      	} else if (z <= 4.4e+64) {
      		tmp = y * (x_m / t);
      	} else {
      		tmp = fma(x_m, (t / z), 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 <= -3.2e+71)
      		tmp = x_m;
      	elseif (z <= 4.4e+64)
      		tmp = Float64(y * Float64(x_m / t));
      	else
      		tmp = fma(x_m, Float64(t / z), x_m);
      	end
      	return Float64(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, -3.2e+71], x$95$m, If[LessEqual[z, 4.4e+64], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(t / z), $MachinePrecision] + x$95$m), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      
      \\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;z \leq -3.2 \cdot 10^{+71}:\\
      \;\;\;\;x\_m\\
      
      \mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\
      \;\;\;\;y \cdot \frac{x\_m}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(x\_m, \frac{t}{z}, x\_m\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -3.20000000000000023e71

        1. Initial program 67.1%

          \[\frac{x \cdot \left(y - z\right)}{t - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift--.f64N/A

            \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
          3. remove-double-negN/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
          4. lift--.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
          5. remove-double-negN/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
          6. lift-*.f64N/A

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

            \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
          8. clear-numN/A

            \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
          9. un-div-invN/A

            \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
          10. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
          11. lower-/.f6499.9

            \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
        4. Applied rewrites99.9%

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

          \[\leadsto \frac{x}{\color{blue}{1}} \]
        6. Step-by-step derivation
          1. Applied rewrites70.0%

            \[\leadsto \frac{x}{\color{blue}{1}} \]
          2. Step-by-step derivation
            1. /-rgt-identity70.0

              \[\leadsto \color{blue}{x} \]
          3. Applied rewrites70.0%

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

          if -3.20000000000000023e71 < z < 4.40000000000000004e64

          1. Initial program 86.8%

            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
          2. Add Preprocessing
          3. Taylor expanded in z around 0

            \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
            2. lower-*.f6454.8

              \[\leadsto \frac{\color{blue}{x \cdot y}}{t} \]
          5. Applied rewrites54.8%

            \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
            3. lower-*.f64N/A

              \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
            4. lower-/.f6462.3

              \[\leadsto y \cdot \color{blue}{\frac{x}{t}} \]
          7. Applied rewrites62.3%

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

          if 4.40000000000000004e64 < z

          1. Initial program 76.9%

            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            3. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
            4. lift--.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
            5. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            6. lift-*.f64N/A

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

              \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
            8. clear-numN/A

              \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
            9. un-div-invN/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            10. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            11. lower-/.f6499.8

              \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
          4. Applied rewrites99.8%

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

            \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{t - z}} \]
          6. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot z}{t - z}\right)} \]
            2. distribute-neg-frac2N/A

              \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
            3. sub-negN/A

              \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
            4. mul-1-negN/A

              \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(\left(t + \color{blue}{-1 \cdot z}\right)\right)} \]
            5. +-commutativeN/A

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

              \[\leadsto \frac{x \cdot z}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
            7. mul-1-negN/A

              \[\leadsto \frac{x \cdot z}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(t\right)\right)} \]
            8. remove-double-negN/A

              \[\leadsto \frac{x \cdot z}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
            9. sub-negN/A

              \[\leadsto \frac{x \cdot z}{\color{blue}{z - t}} \]
            10. associate-/l*N/A

              \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
            11. lower-*.f64N/A

              \[\leadsto \color{blue}{x \cdot \frac{z}{z - t}} \]
            12. lower-/.f64N/A

              \[\leadsto x \cdot \color{blue}{\frac{z}{z - t}} \]
            13. lower--.f6491.8

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

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

            \[\leadsto \color{blue}{x + \frac{t \cdot x}{z}} \]
          9. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{t \cdot x}{z} + x} \]
            2. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{x \cdot t}}{z} + x \]
            3. associate-/l*N/A

              \[\leadsto \color{blue}{x \cdot \frac{t}{z}} + x \]
            4. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
            5. lower-/.f6474.0

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{t}{z}}, x\right) \]
          10. Applied rewrites74.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{t}{z}, x\right)} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 8: 59.3% 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 -3.2 \cdot 10^{+71}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m y z t)
         :precision binary64
         (* x_s (if (<= z -3.2e+71) x_m (if (<= z 4.4e+64) (* y (/ x_m t)) x_m))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y, double z, double t) {
        	double tmp;
        	if (z <= -3.2e+71) {
        		tmp = x_m;
        	} else if (z <= 4.4e+64) {
        		tmp = y * (x_m / t);
        	} else {
        		tmp = x_m;
        	}
        	return x_s * tmp;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0d0, x)
        real(8) function code(x_s, x_m, y, z, t)
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: tmp
            if (z <= (-3.2d+71)) then
                tmp = x_m
            else if (z <= 4.4d+64) then
                tmp = y * (x_m / t)
            else
                tmp = x_m
            end if
            code = x_s * tmp
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        public static double code(double x_s, double x_m, double y, double z, double t) {
        	double tmp;
        	if (z <= -3.2e+71) {
        		tmp = x_m;
        	} else if (z <= 4.4e+64) {
        		tmp = y * (x_m / t);
        	} else {
        		tmp = x_m;
        	}
        	return x_s * tmp;
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        def code(x_s, x_m, y, z, t):
        	tmp = 0
        	if z <= -3.2e+71:
        		tmp = x_m
        	elif z <= 4.4e+64:
        		tmp = y * (x_m / t)
        	else:
        		tmp = x_m
        	return x_s * tmp
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m, y, z, t)
        	tmp = 0.0
        	if (z <= -3.2e+71)
        		tmp = x_m;
        	elseif (z <= 4.4e+64)
        		tmp = Float64(y * Float64(x_m / t));
        	else
        		tmp = x_m;
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        function tmp_2 = code(x_s, x_m, y, z, t)
        	tmp = 0.0;
        	if (z <= -3.2e+71)
        		tmp = x_m;
        	elseif (z <= 4.4e+64)
        		tmp = y * (x_m / t);
        	else
        		tmp = x_m;
        	end
        	tmp_2 = x_s * tmp;
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -3.2e+71], x$95$m, If[LessEqual[z, 4.4e+64], N[(y * N[(x$95$m / t), $MachinePrecision]), $MachinePrecision], x$95$m]]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;z \leq -3.2 \cdot 10^{+71}:\\
        \;\;\;\;x\_m\\
        
        \mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\
        \;\;\;\;y \cdot \frac{x\_m}{t}\\
        
        \mathbf{else}:\\
        \;\;\;\;x\_m\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -3.20000000000000023e71 or 4.40000000000000004e64 < z

          1. Initial program 72.5%

            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            3. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
            4. lift--.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
            5. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            6. lift-*.f64N/A

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

              \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
            8. clear-numN/A

              \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
            9. un-div-invN/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            10. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            11. lower-/.f6499.8

              \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
          4. Applied rewrites99.8%

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

            \[\leadsto \frac{x}{\color{blue}{1}} \]
          6. Step-by-step derivation
            1. Applied rewrites71.9%

              \[\leadsto \frac{x}{\color{blue}{1}} \]
            2. Step-by-step derivation
              1. /-rgt-identity71.9

                \[\leadsto \color{blue}{x} \]
            3. Applied rewrites71.9%

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

            if -3.20000000000000023e71 < z < 4.40000000000000004e64

            1. Initial program 86.8%

              \[\frac{x \cdot \left(y - z\right)}{t - z} \]
            2. Add Preprocessing
            3. Taylor expanded in z around 0

              \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
              2. lower-*.f6454.8

                \[\leadsto \frac{\color{blue}{x \cdot y}}{t} \]
            5. Applied rewrites54.8%

              \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
              3. lower-*.f64N/A

                \[\leadsto \color{blue}{y \cdot \frac{x}{t}} \]
              4. lower-/.f6462.3

                \[\leadsto y \cdot \color{blue}{\frac{x}{t}} \]
            7. Applied rewrites62.3%

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

          Alternative 9: 34.4% accurate, 23.0× speedup?

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

            \[\frac{x \cdot \left(y - z\right)}{t - z} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto \frac{x \cdot \color{blue}{\left(y - z\right)}}{t - z} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            3. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}}{t - z} \]
            4. lift--.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \left(y - z\right)\right)\right)\right)}{\color{blue}{t - z}} \]
            5. remove-double-negN/A

              \[\leadsto \frac{\color{blue}{x \cdot \left(y - z\right)}}{t - z} \]
            6. lift-*.f64N/A

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

              \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
            8. clear-numN/A

              \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
            9. un-div-invN/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            10. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
            11. lower-/.f6496.7

              \[\leadsto \frac{x}{\color{blue}{\frac{t - z}{y - z}}} \]
          4. Applied rewrites96.7%

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

            \[\leadsto \frac{x}{\color{blue}{1}} \]
          6. Step-by-step derivation
            1. Applied rewrites33.1%

              \[\leadsto \frac{x}{\color{blue}{1}} \]
            2. Step-by-step derivation
              1. /-rgt-identity33.1

                \[\leadsto \color{blue}{x} \]
            3. Applied rewrites33.1%

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

            Developer Target 1: 97.0% accurate, 0.8× 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 2024219 
            (FPCore (x y z t)
              :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
              :precision binary64
            
              :alt
              (! :herbie-platform default (/ x (/ (- t z) (- y z))))
            
              (/ (* x (- y z)) (- t z)))