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

Percentage Accurate: 84.7% → 96.7%
Time: 7.6s
Alternatives: 10
Speedup: 0.8×

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 10 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.7% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 89.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t - z} \cdot x} \]
      6. lower-/.f6496.5

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

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

    if 3.3000000000000002e-38 < x

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

Alternative 2: 89.7% 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 -1.45 \cdot 10^{+154}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-x\_m}{z}, y, x\_m\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+140}:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - t} \cdot x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -1.45e+154)
    (fma (/ (- x_m) z) y x_m)
    (if (<= z 1.25e+140) (* (/ x_m (- t z)) (- y z)) (* (/ z (- z t)) x_m)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.45e+154) {
		tmp = fma((-x_m / z), y, x_m);
	} else if (z <= 1.25e+140) {
		tmp = (x_m / (t - z)) * (y - z);
	} else {
		tmp = (z / (z - t)) * 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.45e+154)
		tmp = fma(Float64(Float64(-x_m) / z), y, x_m);
	elseif (z <= 1.25e+140)
		tmp = Float64(Float64(x_m / Float64(t - z)) * Float64(y - z));
	else
		tmp = Float64(Float64(z / Float64(z - t)) * 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, -1.45e+154], N[(N[((-x$95$m) / z), $MachinePrecision] * y + x$95$m), $MachinePrecision], If[LessEqual[z, 1.25e+140], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(z - t), $MachinePrecision]), $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 -1.45 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-x\_m}{z}, y, x\_m\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4499999999999999e154

    1. Initial program 67.4%

      \[\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-lft-outN/A

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

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

        \[\leadsto 0 - \left(\frac{x \cdot y}{z} + \color{blue}{-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. lower-/.f64N/A

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

        \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
      22. lower-*.f6489.2

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

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

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

      if -1.4499999999999999e154 < z < 1.25000000000000002e140

      1. Initial program 92.8%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
        7. lower-/.f6492.9

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

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

      if 1.25000000000000002e140 < z

      1. Initial program 65.9%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
        8. lower-neg.f6490.8

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

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

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

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

        Alternative 3: 74.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 -3700000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-x\_m}{z}, y, x\_m\right)\\ \mathbf{elif}\;z \leq 0.47:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - t} \cdot 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 -3700000000.0)
            (fma (/ (- x_m) z) y x_m)
            (if (<= z 0.47) (* (/ x_m (- t z)) y) (* (/ z (- z 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 <= -3700000000.0) {
        		tmp = fma((-x_m / z), y, x_m);
        	} else if (z <= 0.47) {
        		tmp = (x_m / (t - z)) * y;
        	} else {
        		tmp = (z / (z - t)) * 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 <= -3700000000.0)
        		tmp = fma(Float64(Float64(-x_m) / z), y, x_m);
        	elseif (z <= 0.47)
        		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
        	else
        		tmp = Float64(Float64(z / Float64(z - t)) * 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, -3700000000.0], N[(N[((-x$95$m) / z), $MachinePrecision] * y + x$95$m), $MachinePrecision], If[LessEqual[z, 0.47], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(z / N[(z - t), $MachinePrecision]), $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 -3700000000:\\
        \;\;\;\;\mathsf{fma}\left(\frac{-x\_m}{z}, y, x\_m\right)\\
        
        \mathbf{elif}\;z \leq 0.47:\\
        \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{z}{z - t} \cdot x\_m\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -3.7e9

          1. Initial program 75.0%

            \[\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-lft-outN/A

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

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

              \[\leadsto 0 - \left(\frac{x \cdot y}{z} + \color{blue}{-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. lower-/.f64N/A

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

              \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
            22. lower-*.f6483.3

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

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

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

            if -3.7e9 < z < 0.46999999999999997

            1. Initial program 95.1%

              \[\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}{\frac{x}{t - z} \cdot y} \]
              2. lower-*.f64N/A

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

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

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

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

            if 0.46999999999999997 < z

            1. Initial program 74.1%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
              8. lower-neg.f6485.5

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

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

                \[\leadsto \left(-z\right) \cdot \color{blue}{\frac{x}{t - z}} \]
              2. Step-by-step derivation
                1. Applied rewrites85.5%

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

              Alternative 4: 73.7% 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 -3700000000:\\ \;\;\;\;x\_m - \frac{y \cdot x\_m}{z}\\ \mathbf{elif}\;z \leq 0.47:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - t} \cdot 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 -3700000000.0)
                  (- x_m (/ (* y x_m) z))
                  (if (<= z 0.47) (* (/ x_m (- t z)) y) (* (/ z (- z 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 <= -3700000000.0) {
              		tmp = x_m - ((y * x_m) / z);
              	} else if (z <= 0.47) {
              		tmp = (x_m / (t - z)) * y;
              	} else {
              		tmp = (z / (z - t)) * 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 <= (-3700000000.0d0)) then
                      tmp = x_m - ((y * x_m) / z)
                  else if (z <= 0.47d0) then
                      tmp = (x_m / (t - z)) * y
                  else
                      tmp = (z / (z - t)) * 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 <= -3700000000.0) {
              		tmp = x_m - ((y * x_m) / z);
              	} else if (z <= 0.47) {
              		tmp = (x_m / (t - z)) * y;
              	} else {
              		tmp = (z / (z - t)) * 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 <= -3700000000.0:
              		tmp = x_m - ((y * x_m) / z)
              	elif z <= 0.47:
              		tmp = (x_m / (t - z)) * y
              	else:
              		tmp = (z / (z - t)) * 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 <= -3700000000.0)
              		tmp = Float64(x_m - Float64(Float64(y * x_m) / z));
              	elseif (z <= 0.47)
              		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
              	else
              		tmp = Float64(Float64(z / Float64(z - t)) * 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 <= -3700000000.0)
              		tmp = x_m - ((y * x_m) / z);
              	elseif (z <= 0.47)
              		tmp = (x_m / (t - z)) * y;
              	else
              		tmp = (z / (z - t)) * 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, -3700000000.0], N[(x$95$m - N[(N[(y * x$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.47], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(z / N[(z - t), $MachinePrecision]), $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 -3700000000:\\
              \;\;\;\;x\_m - \frac{y \cdot x\_m}{z}\\
              
              \mathbf{elif}\;z \leq 0.47:\\
              \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{z}{z - t} \cdot x\_m\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -3.7e9

                1. Initial program 75.0%

                  \[\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-lft-outN/A

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

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

                    \[\leadsto 0 - \left(\frac{x \cdot y}{z} + \color{blue}{-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. lower-/.f64N/A

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

                    \[\leadsto x - \frac{\color{blue}{y \cdot x}}{z} \]
                  22. lower-*.f6483.3

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

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

                if -3.7e9 < z < 0.46999999999999997

                1. Initial program 95.1%

                  \[\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}{\frac{x}{t - z} \cdot y} \]
                  2. lower-*.f64N/A

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

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

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

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

                if 0.46999999999999997 < z

                1. Initial program 74.1%

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                  8. lower-neg.f6485.5

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

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

                    \[\leadsto \left(-z\right) \cdot \color{blue}{\frac{x}{t - z}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites85.5%

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

                  Alternative 5: 73.8% 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 := \frac{z}{z - t} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.47:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \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 (* (/ z (- z t)) x_m)))
                     (*
                      x_s
                      (if (<= z -7.5e+86) t_1 (if (<= z 0.47) (* (/ x_m (- t z)) y) 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 = (z / (z - t)) * x_m;
                  	double tmp;
                  	if (z <= -7.5e+86) {
                  		tmp = t_1;
                  	} else if (z <= 0.47) {
                  		tmp = (x_m / (t - z)) * y;
                  	} 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 = (z / (z - t)) * x_m
                      if (z <= (-7.5d+86)) then
                          tmp = t_1
                      else if (z <= 0.47d0) then
                          tmp = (x_m / (t - z)) * y
                      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 = (z / (z - t)) * x_m;
                  	double tmp;
                  	if (z <= -7.5e+86) {
                  		tmp = t_1;
                  	} else if (z <= 0.47) {
                  		tmp = (x_m / (t - z)) * y;
                  	} 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 = (z / (z - t)) * x_m
                  	tmp = 0
                  	if z <= -7.5e+86:
                  		tmp = t_1
                  	elif z <= 0.47:
                  		tmp = (x_m / (t - z)) * y
                  	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(Float64(z / Float64(z - t)) * x_m)
                  	tmp = 0.0
                  	if (z <= -7.5e+86)
                  		tmp = t_1;
                  	elseif (z <= 0.47)
                  		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
                  	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 = (z / (z - t)) * x_m;
                  	tmp = 0.0;
                  	if (z <= -7.5e+86)
                  		tmp = t_1;
                  	elseif (z <= 0.47)
                  		tmp = (x_m / (t - z)) * y;
                  	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[(N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -7.5e+86], t$95$1, If[LessEqual[z, 0.47], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $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 := \frac{z}{z - t} \cdot x\_m\\
                  x\_s \cdot \begin{array}{l}
                  \mathbf{if}\;z \leq -7.5 \cdot 10^{+86}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 0.47:\\
                  \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -7.4999999999999997e86 or 0.46999999999999997 < z

                    1. Initial program 72.6%

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                      8. lower-neg.f6483.8

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

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

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

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

                        if -7.4999999999999997e86 < z < 0.46999999999999997

                        1. Initial program 94.9%

                          \[\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}{\frac{x}{t - z} \cdot y} \]
                          2. lower-*.f64N/A

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

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

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

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

                      Alternative 6: 67.0% 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 -1.95 \cdot 10^{+87}:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{elif}\;z \leq 110:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x\_m}{z}, t, 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 -1.95e+87)
                          (* 1.0 x_m)
                          (if (<= z 110.0) (* (/ x_m (- t z)) y) (fma (/ x_m z) t x_m)))))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y, double z, double t) {
                      	double tmp;
                      	if (z <= -1.95e+87) {
                      		tmp = 1.0 * x_m;
                      	} else if (z <= 110.0) {
                      		tmp = (x_m / (t - z)) * y;
                      	} else {
                      		tmp = fma((x_m / z), t, 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+87)
                      		tmp = Float64(1.0 * x_m);
                      	elseif (z <= 110.0)
                      		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
                      	else
                      		tmp = fma(Float64(x_m / z), t, 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, -1.95e+87], N[(1.0 * x$95$m), $MachinePrecision], If[LessEqual[z, 110.0], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * t + 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 -1.95 \cdot 10^{+87}:\\
                      \;\;\;\;1 \cdot x\_m\\
                      
                      \mathbf{elif}\;z \leq 110:\\
                      \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(\frac{x\_m}{z}, t, x\_m\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -1.9500000000000001e87

                        1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

                          if -1.9500000000000001e87 < z < 110

                          1. Initial program 94.9%

                            \[\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}{\frac{x}{t - z} \cdot y} \]
                            2. lower-*.f64N/A

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

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

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

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

                          if 110 < z

                          1. Initial program 73.6%

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                            8. lower-neg.f6485.2

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

                            \[\leadsto \color{blue}{\frac{z}{t - z} \cdot \left(-x\right)} \]
                          6. Taylor expanded in t around 0

                            \[\leadsto x + \color{blue}{\frac{t \cdot x}{z}} \]
                          7. Step-by-step derivation
                            1. Applied rewrites69.0%

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

                          Alternative 7: 60.1% accurate, 0.8× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{x\_m}{z}, t, x\_m\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3700000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-17}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \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 (fma (/ x_m z) t x_m)))
                             (*
                              x_s
                              (if (<= z -3700000000.0) t_1 (if (<= z 1.65e-17) (/ (* y x_m) 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 = fma((x_m / z), t, x_m);
                          	double tmp;
                          	if (z <= -3700000000.0) {
                          		tmp = t_1;
                          	} else if (z <= 1.65e-17) {
                          		tmp = (y * x_m) / 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 = fma(Float64(x_m / z), t, x_m)
                          	tmp = 0.0
                          	if (z <= -3700000000.0)
                          		tmp = t_1;
                          	elseif (z <= 1.65e-17)
                          		tmp = Float64(Float64(y * x_m) / t);
                          	else
                          		tmp = t_1;
                          	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_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] * t + x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -3700000000.0], t$95$1, If[LessEqual[z, 1.65e-17], N[(N[(y * x$95$m), $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 := \mathsf{fma}\left(\frac{x\_m}{z}, t, x\_m\right)\\
                          x\_s \cdot \begin{array}{l}
                          \mathbf{if}\;z \leq -3700000000:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;z \leq 1.65 \cdot 10^{-17}:\\
                          \;\;\;\;\frac{y \cdot x\_m}{t}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -3.7e9 or 1.65e-17 < z

                            1. Initial program 75.8%

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                              8. lower-neg.f6477.6

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

                              \[\leadsto \color{blue}{\frac{z}{t - z} \cdot \left(-x\right)} \]
                            6. Taylor expanded in t around 0

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

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

                              if -3.7e9 < z < 1.65e-17

                              1. Initial program 94.9%

                                \[\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. *-commutativeN/A

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

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

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

                            Alternative 8: 60.0% 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 -3700000000:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot 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 -3700000000.0)
                                (* 1.0 x_m)
                                (if (<= z 6.2e-29) (/ (* y x_m) t) (* 1.0 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 <= -3700000000.0) {
                            		tmp = 1.0 * x_m;
                            	} else if (z <= 6.2e-29) {
                            		tmp = (y * x_m) / t;
                            	} else {
                            		tmp = 1.0 * 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 <= (-3700000000.0d0)) then
                                    tmp = 1.0d0 * x_m
                                else if (z <= 6.2d-29) then
                                    tmp = (y * x_m) / t
                                else
                                    tmp = 1.0d0 * 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 <= -3700000000.0) {
                            		tmp = 1.0 * x_m;
                            	} else if (z <= 6.2e-29) {
                            		tmp = (y * x_m) / t;
                            	} else {
                            		tmp = 1.0 * 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 <= -3700000000.0:
                            		tmp = 1.0 * x_m
                            	elif z <= 6.2e-29:
                            		tmp = (y * x_m) / t
                            	else:
                            		tmp = 1.0 * 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 <= -3700000000.0)
                            		tmp = Float64(1.0 * x_m);
                            	elseif (z <= 6.2e-29)
                            		tmp = Float64(Float64(y * x_m) / t);
                            	else
                            		tmp = Float64(1.0 * 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 <= -3700000000.0)
                            		tmp = 1.0 * x_m;
                            	elseif (z <= 6.2e-29)
                            		tmp = (y * x_m) / t;
                            	else
                            		tmp = 1.0 * 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, -3700000000.0], N[(1.0 * x$95$m), $MachinePrecision], If[LessEqual[z, 6.2e-29], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], N[(1.0 * 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 -3700000000:\\
                            \;\;\;\;1 \cdot x\_m\\
                            
                            \mathbf{elif}\;z \leq 6.2 \cdot 10^{-29}:\\
                            \;\;\;\;\frac{y \cdot x\_m}{t}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;1 \cdot x\_m\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -3.7e9 or 6.20000000000000052e-29 < z

                              1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

                                if -3.7e9 < z < 6.20000000000000052e-29

                                1. Initial program 94.9%

                                  \[\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. *-commutativeN/A

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

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

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

                              Alternative 9: 59.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 -3700000000:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{x\_m}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot 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 -3700000000.0)
                                  (* 1.0 x_m)
                                  (if (<= z 5.8e-29) (* (/ x_m t) y) (* 1.0 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 <= -3700000000.0) {
                              		tmp = 1.0 * x_m;
                              	} else if (z <= 5.8e-29) {
                              		tmp = (x_m / t) * y;
                              	} else {
                              		tmp = 1.0 * 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 <= (-3700000000.0d0)) then
                                      tmp = 1.0d0 * x_m
                                  else if (z <= 5.8d-29) then
                                      tmp = (x_m / t) * y
                                  else
                                      tmp = 1.0d0 * 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 <= -3700000000.0) {
                              		tmp = 1.0 * x_m;
                              	} else if (z <= 5.8e-29) {
                              		tmp = (x_m / t) * y;
                              	} else {
                              		tmp = 1.0 * 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 <= -3700000000.0:
                              		tmp = 1.0 * x_m
                              	elif z <= 5.8e-29:
                              		tmp = (x_m / t) * y
                              	else:
                              		tmp = 1.0 * 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 <= -3700000000.0)
                              		tmp = Float64(1.0 * x_m);
                              	elseif (z <= 5.8e-29)
                              		tmp = Float64(Float64(x_m / t) * y);
                              	else
                              		tmp = Float64(1.0 * 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 <= -3700000000.0)
                              		tmp = 1.0 * x_m;
                              	elseif (z <= 5.8e-29)
                              		tmp = (x_m / t) * y;
                              	else
                              		tmp = 1.0 * 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, -3700000000.0], N[(1.0 * x$95$m), $MachinePrecision], If[LessEqual[z, 5.8e-29], N[(N[(x$95$m / t), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * 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 -3700000000:\\
                              \;\;\;\;1 \cdot x\_m\\
                              
                              \mathbf{elif}\;z \leq 5.8 \cdot 10^{-29}:\\
                              \;\;\;\;\frac{x\_m}{t} \cdot y\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;1 \cdot x\_m\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -3.7e9 or 5.80000000000000048e-29 < z

                                1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

                                  if -3.7e9 < z < 5.80000000000000048e-29

                                  1. Initial program 94.9%

                                    \[\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. *-commutativeN/A

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

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

                                    \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites65.2%

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

                                  Alternative 10: 34.9% accurate, 3.8× speedup?

                                  \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(1 \cdot x\_m\right) \end{array} \]
                                  x\_m = (fabs.f64 x)
                                  x\_s = (copysign.f64 #s(literal 1 binary64) x)
                                  (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* 1.0 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 * (1.0 * 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 * (1.0d0 * 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 * (1.0 * 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 * (1.0 * 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 * Float64(1.0 * 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 * (1.0 * 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 * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  x\_m = \left|x\right|
                                  \\
                                  x\_s = \mathsf{copysign}\left(1, x\right)
                                  
                                  \\
                                  x\_s \cdot \left(1 \cdot x\_m\right)
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 85.6%

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{1} \cdot x \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites36.7%

                                      \[\leadsto \color{blue}{1} \cdot x \]
                                    2. 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 2024255 
                                    (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)))