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

Percentage Accurate: 84.2% → 97.1%
Time: 9.1s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 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.2% 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.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{y - z}{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(x * Float64(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[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{y - z}{t - z}
\end{array}
Derivation
  1. Initial program 84.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.9

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

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

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

Alternative 2: 75.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{z - t} \cdot x\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-49}:\\ \;\;\;\;\frac{y}{t - z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ z (- z t)) x)))
   (if (<= z -4.8e+105)
     (* (/ (- z y) z) x)
     (if (<= z -1.15e+20) t_1 (if (<= z 2.3e-49) (* (/ y (- t z)) x) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (z / (z - t)) * x;
	double tmp;
	if (z <= -4.8e+105) {
		tmp = ((z - y) / z) * x;
	} else if (z <= -1.15e+20) {
		tmp = t_1;
	} else if (z <= 2.3e-49) {
		tmp = (y / (t - z)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z / (z - t)) * x
    if (z <= (-4.8d+105)) then
        tmp = ((z - y) / z) * x
    else if (z <= (-1.15d+20)) then
        tmp = t_1
    else if (z <= 2.3d-49) then
        tmp = (y / (t - z)) * x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z / (z - t)) * x;
	double tmp;
	if (z <= -4.8e+105) {
		tmp = ((z - y) / z) * x;
	} else if (z <= -1.15e+20) {
		tmp = t_1;
	} else if (z <= 2.3e-49) {
		tmp = (y / (t - z)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z / (z - t)) * x
	tmp = 0
	if z <= -4.8e+105:
		tmp = ((z - y) / z) * x
	elif z <= -1.15e+20:
		tmp = t_1
	elif z <= 2.3e-49:
		tmp = (y / (t - z)) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z / Float64(z - t)) * x)
	tmp = 0.0
	if (z <= -4.8e+105)
		tmp = Float64(Float64(Float64(z - y) / z) * x);
	elseif (z <= -1.15e+20)
		tmp = t_1;
	elseif (z <= 2.3e-49)
		tmp = Float64(Float64(y / Float64(t - z)) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z / (z - t)) * x;
	tmp = 0.0;
	if (z <= -4.8e+105)
		tmp = ((z - y) / z) * x;
	elseif (z <= -1.15e+20)
		tmp = t_1;
	elseif (z <= 2.3e-49)
		tmp = (y / (t - z)) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -4.8e+105], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -1.15e+20], t$95$1, If[LessEqual[z, 2.3e-49], N[(N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z}{z - t} \cdot x\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+105}:\\
\;\;\;\;\frac{z - y}{z} \cdot x\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-49}:\\
\;\;\;\;\frac{y}{t - z} \cdot x\\

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


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

    1. Initial program 71.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.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 rewrites59.5%

        \[\leadsto \color{blue}{1} \cdot x \]
      2. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{z - y}{z}} \cdot x \]
        9. lower--.f6487.2

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

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

      if -4.7999999999999995e105 < z < -1.15e20 or 2.2999999999999999e-49 < z

      1. Initial program 77.5%

        \[\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 rewrites51.6%

          \[\leadsto \color{blue}{1} \cdot x \]
        2. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.15e20 < z < 2.2999999999999999e-49

        1. Initial program 94.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. 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-/.f6493.7

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

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

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

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

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

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

      Alternative 3: 74.4% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{z - t} \cdot x\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+105}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-49}:\\ \;\;\;\;\frac{y}{t - z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* (/ z (- z t)) x)))
         (if (<= z -4.8e+105)
           (- x (/ (* x y) z))
           (if (<= z -1.15e+20) t_1 (if (<= z 2.3e-49) (* (/ y (- t z)) x) t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (z / (z - t)) * x;
      	double tmp;
      	if (z <= -4.8e+105) {
      		tmp = x - ((x * y) / z);
      	} else if (z <= -1.15e+20) {
      		tmp = t_1;
      	} else if (z <= 2.3e-49) {
      		tmp = (y / (t - z)) * x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      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
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (z / (z - t)) * x
          if (z <= (-4.8d+105)) then
              tmp = x - ((x * y) / z)
          else if (z <= (-1.15d+20)) then
              tmp = t_1
          else if (z <= 2.3d-49) then
              tmp = (y / (t - z)) * x
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = (z / (z - t)) * x;
      	double tmp;
      	if (z <= -4.8e+105) {
      		tmp = x - ((x * y) / z);
      	} else if (z <= -1.15e+20) {
      		tmp = t_1;
      	} else if (z <= 2.3e-49) {
      		tmp = (y / (t - z)) * x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = (z / (z - t)) * x
      	tmp = 0
      	if z <= -4.8e+105:
      		tmp = x - ((x * y) / z)
      	elif z <= -1.15e+20:
      		tmp = t_1
      	elif z <= 2.3e-49:
      		tmp = (y / (t - z)) * x
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(z / Float64(z - t)) * x)
      	tmp = 0.0
      	if (z <= -4.8e+105)
      		tmp = Float64(x - Float64(Float64(x * y) / z));
      	elseif (z <= -1.15e+20)
      		tmp = t_1;
      	elseif (z <= 2.3e-49)
      		tmp = Float64(Float64(y / Float64(t - z)) * x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = (z / (z - t)) * x;
      	tmp = 0.0;
      	if (z <= -4.8e+105)
      		tmp = x - ((x * y) / z);
      	elseif (z <= -1.15e+20)
      		tmp = t_1;
      	elseif (z <= 2.3e-49)
      		tmp = (y / (t - z)) * x;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -4.8e+105], N[(x - N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e+20], t$95$1, If[LessEqual[z, 2.3e-49], N[(N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{z}{z - t} \cdot x\\
      \mathbf{if}\;z \leq -4.8 \cdot 10^{+105}:\\
      \;\;\;\;x - \frac{x \cdot y}{z}\\
      
      \mathbf{elif}\;z \leq -1.15 \cdot 10^{+20}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 2.3 \cdot 10^{-49}:\\
      \;\;\;\;\frac{y}{t - z} \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -4.7999999999999995e105

        1. Initial program 71.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-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. 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-*.f6484.5

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

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

        if -4.7999999999999995e105 < z < -1.15e20 or 2.2999999999999999e-49 < z

        1. Initial program 77.5%

          \[\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 rewrites51.6%

            \[\leadsto \color{blue}{1} \cdot x \]
          2. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.15e20 < z < 2.2999999999999999e-49

          1. Initial program 94.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. 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-/.f6493.7

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+105}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+20}:\\ \;\;\;\;\frac{z}{z - t} \cdot x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-49}:\\ \;\;\;\;\frac{y}{t - z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - t} \cdot x\\ \end{array} \]
        9. Add Preprocessing

        Alternative 4: 68.5% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+268}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-46}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (/ (* x (- y z)) t)))
           (if (<= t -1.9e+268)
             (* (/ x (- t z)) y)
             (if (<= t -7.5e-32) t_1 (if (<= t 1.2e-46) (- x (/ (* x y) z)) t_1)))))
        double code(double x, double y, double z, double t) {
        	double t_1 = (x * (y - z)) / t;
        	double tmp;
        	if (t <= -1.9e+268) {
        		tmp = (x / (t - z)) * y;
        	} else if (t <= -7.5e-32) {
        		tmp = t_1;
        	} else if (t <= 1.2e-46) {
        		tmp = x - ((x * y) / z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        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
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (x * (y - z)) / t
            if (t <= (-1.9d+268)) then
                tmp = (x / (t - z)) * y
            else if (t <= (-7.5d-32)) then
                tmp = t_1
            else if (t <= 1.2d-46) then
                tmp = x - ((x * y) / z)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = (x * (y - z)) / t;
        	double tmp;
        	if (t <= -1.9e+268) {
        		tmp = (x / (t - z)) * y;
        	} else if (t <= -7.5e-32) {
        		tmp = t_1;
        	} else if (t <= 1.2e-46) {
        		tmp = x - ((x * y) / z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = (x * (y - z)) / t
        	tmp = 0
        	if t <= -1.9e+268:
        		tmp = (x / (t - z)) * y
        	elif t <= -7.5e-32:
        		tmp = t_1
        	elif t <= 1.2e-46:
        		tmp = x - ((x * y) / z)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(Float64(x * Float64(y - z)) / t)
        	tmp = 0.0
        	if (t <= -1.9e+268)
        		tmp = Float64(Float64(x / Float64(t - z)) * y);
        	elseif (t <= -7.5e-32)
        		tmp = t_1;
        	elseif (t <= 1.2e-46)
        		tmp = Float64(x - Float64(Float64(x * y) / z));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = (x * (y - z)) / t;
        	tmp = 0.0;
        	if (t <= -1.9e+268)
        		tmp = (x / (t - z)) * y;
        	elseif (t <= -7.5e-32)
        		tmp = t_1;
        	elseif (t <= 1.2e-46)
        		tmp = x - ((x * y) / z);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.9e+268], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, -7.5e-32], t$95$1, If[LessEqual[t, 1.2e-46], N[(x - N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x \cdot \left(y - z\right)}{t}\\
        \mathbf{if}\;t \leq -1.9 \cdot 10^{+268}:\\
        \;\;\;\;\frac{x}{t - z} \cdot y\\
        
        \mathbf{elif}\;t \leq -7.5 \cdot 10^{-32}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 1.2 \cdot 10^{-46}:\\
        \;\;\;\;x - \frac{x \cdot y}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -1.90000000000000013e268

          1. Initial program 49.5%

            \[\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--.f6485.1

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

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

          if -1.90000000000000013e268 < t < -7.49999999999999953e-32 or 1.20000000000000007e-46 < t

          1. Initial program 87.5%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot x}}{t} \]
            4. lower--.f6473.6

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

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

          if -7.49999999999999953e-32 < t < 1.20000000000000007e-46

          1. Initial program 85.9%

            \[\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. 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}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification78.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+268}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-46}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 5: 90.4% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{+160}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+154}:\\ \;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - t} \cdot x\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= z -1.16e+160)
           (* (/ (- z y) z) x)
           (if (<= z 1.02e+154) (* (/ x (- t z)) (- y z)) (* (/ z (- z t)) x))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -1.16e+160) {
        		tmp = ((z - y) / z) * x;
        	} else if (z <= 1.02e+154) {
        		tmp = (x / (t - z)) * (y - z);
        	} else {
        		tmp = (z / (z - t)) * x;
        	}
        	return tmp;
        }
        
        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
            real(8) :: tmp
            if (z <= (-1.16d+160)) then
                tmp = ((z - y) / z) * x
            else if (z <= 1.02d+154) then
                tmp = (x / (t - z)) * (y - z)
            else
                tmp = (z / (z - t)) * x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -1.16e+160) {
        		tmp = ((z - y) / z) * x;
        	} else if (z <= 1.02e+154) {
        		tmp = (x / (t - z)) * (y - z);
        	} else {
        		tmp = (z / (z - t)) * x;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if z <= -1.16e+160:
        		tmp = ((z - y) / z) * x
        	elif z <= 1.02e+154:
        		tmp = (x / (t - z)) * (y - z)
        	else:
        		tmp = (z / (z - t)) * x
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (z <= -1.16e+160)
        		tmp = Float64(Float64(Float64(z - y) / z) * x);
        	elseif (z <= 1.02e+154)
        		tmp = Float64(Float64(x / Float64(t - z)) * Float64(y - z));
        	else
        		tmp = Float64(Float64(z / Float64(z - t)) * x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (z <= -1.16e+160)
        		tmp = ((z - y) / z) * x;
        	elseif (z <= 1.02e+154)
        		tmp = (x / (t - z)) * (y - z);
        	else
        		tmp = (z / (z - t)) * x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[z, -1.16e+160], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.02e+154], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.16 \cdot 10^{+160}:\\
        \;\;\;\;\frac{z - y}{z} \cdot x\\
        
        \mathbf{elif}\;z \leq 1.02 \cdot 10^{+154}:\\
        \;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{z}{z - t} \cdot x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.16000000000000006e160

          1. Initial program 72.3%

            \[\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 rewrites63.5%

              \[\leadsto \color{blue}{1} \cdot x \]
            2. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{z - y}{z}} \cdot x \]
              9. lower--.f6492.1

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

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

            if -1.16000000000000006e160 < z < 1.02000000000000007e154

            1. Initial program 91.4%

              \[\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-/.f6491.3

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

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

            if 1.02000000000000007e154 < z

            1. Initial program 54.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-/.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 rewrites79.7%

                \[\leadsto \color{blue}{1} \cdot x \]
              2. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 71.3% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+18}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{+84}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -9.5e+18)
               (- x (/ (* x y) z))
               (if (<= z 3.05e+84) (* (/ x (- t z)) y) (* 1.0 x))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -9.5e+18) {
            		tmp = x - ((x * y) / z);
            	} else if (z <= 3.05e+84) {
            		tmp = (x / (t - z)) * y;
            	} else {
            		tmp = 1.0 * x;
            	}
            	return tmp;
            }
            
            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
                real(8) :: tmp
                if (z <= (-9.5d+18)) then
                    tmp = x - ((x * y) / z)
                else if (z <= 3.05d+84) then
                    tmp = (x / (t - z)) * y
                else
                    tmp = 1.0d0 * x
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -9.5e+18) {
            		tmp = x - ((x * y) / z);
            	} else if (z <= 3.05e+84) {
            		tmp = (x / (t - z)) * y;
            	} else {
            		tmp = 1.0 * x;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -9.5e+18:
            		tmp = x - ((x * y) / z)
            	elif z <= 3.05e+84:
            		tmp = (x / (t - z)) * y
            	else:
            		tmp = 1.0 * x
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -9.5e+18)
            		tmp = Float64(x - Float64(Float64(x * y) / z));
            	elseif (z <= 3.05e+84)
            		tmp = Float64(Float64(x / Float64(t - z)) * y);
            	else
            		tmp = Float64(1.0 * x);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -9.5e+18)
            		tmp = x - ((x * y) / z);
            	elseif (z <= 3.05e+84)
            		tmp = (x / (t - z)) * y;
            	else
            		tmp = 1.0 * x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -9.5e+18], N[(x - N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+84], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -9.5 \cdot 10^{+18}:\\
            \;\;\;\;x - \frac{x \cdot y}{z}\\
            
            \mathbf{elif}\;z \leq 3.05 \cdot 10^{+84}:\\
            \;\;\;\;\frac{x}{t - z} \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;1 \cdot x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -9.5e18

              1. Initial program 77.3%

                \[\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. 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-*.f6471.4

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

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

              if -9.5e18 < z < 3.04999999999999999e84

              1. Initial program 94.4%

                \[\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--.f6473.0

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

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

              if 3.04999999999999999e84 < z

              1. Initial program 62.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 rewrites75.4%

                  \[\leadsto \color{blue}{1} \cdot x \]
              7. Recombined 3 regimes into one program.
              8. Final simplification73.0%

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+18}:\\ \;\;\;\;x - \frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{+84}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
              9. Add Preprocessing

              Alternative 7: 68.9% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+147}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{+84}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= z -9e+147)
                 (* 1.0 x)
                 (if (<= z 3.05e+84) (* (/ x (- t z)) y) (* 1.0 x))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (z <= -9e+147) {
              		tmp = 1.0 * x;
              	} else if (z <= 3.05e+84) {
              		tmp = (x / (t - z)) * y;
              	} else {
              		tmp = 1.0 * x;
              	}
              	return tmp;
              }
              
              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
                  real(8) :: tmp
                  if (z <= (-9d+147)) then
                      tmp = 1.0d0 * x
                  else if (z <= 3.05d+84) then
                      tmp = (x / (t - z)) * y
                  else
                      tmp = 1.0d0 * x
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double tmp;
              	if (z <= -9e+147) {
              		tmp = 1.0 * x;
              	} else if (z <= 3.05e+84) {
              		tmp = (x / (t - z)) * y;
              	} else {
              		tmp = 1.0 * x;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	tmp = 0
              	if z <= -9e+147:
              		tmp = 1.0 * x
              	elif z <= 3.05e+84:
              		tmp = (x / (t - z)) * y
              	else:
              		tmp = 1.0 * x
              	return tmp
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (z <= -9e+147)
              		tmp = Float64(1.0 * x);
              	elseif (z <= 3.05e+84)
              		tmp = Float64(Float64(x / Float64(t - z)) * y);
              	else
              		tmp = Float64(1.0 * x);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	tmp = 0.0;
              	if (z <= -9e+147)
              		tmp = 1.0 * x;
              	elseif (z <= 3.05e+84)
              		tmp = (x / (t - z)) * y;
              	else
              		tmp = 1.0 * x;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[z, -9e+147], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 3.05e+84], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -9 \cdot 10^{+147}:\\
              \;\;\;\;1 \cdot x\\
              
              \mathbf{elif}\;z \leq 3.05 \cdot 10^{+84}:\\
              \;\;\;\;\frac{x}{t - z} \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;1 \cdot x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -9.00000000000000016e147 or 3.04999999999999999e84 < z

                1. Initial program 66.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.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 rewrites71.8%

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

                  if -9.00000000000000016e147 < z < 3.04999999999999999e84

                  1. Initial program 92.3%

                    \[\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--.f6467.1

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

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

                Alternative 8: 61.7% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+20}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-6}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= z -2.3e+20) (* 1.0 x) (if (<= z 5.3e-6) (* (/ y t) x) (* 1.0 x))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (z <= -2.3e+20) {
                		tmp = 1.0 * x;
                	} else if (z <= 5.3e-6) {
                		tmp = (y / t) * x;
                	} else {
                		tmp = 1.0 * x;
                	}
                	return tmp;
                }
                
                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
                    real(8) :: tmp
                    if (z <= (-2.3d+20)) then
                        tmp = 1.0d0 * x
                    else if (z <= 5.3d-6) then
                        tmp = (y / t) * x
                    else
                        tmp = 1.0d0 * x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (z <= -2.3e+20) {
                		tmp = 1.0 * x;
                	} else if (z <= 5.3e-6) {
                		tmp = (y / t) * x;
                	} else {
                		tmp = 1.0 * x;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if z <= -2.3e+20:
                		tmp = 1.0 * x
                	elif z <= 5.3e-6:
                		tmp = (y / t) * x
                	else:
                		tmp = 1.0 * x
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (z <= -2.3e+20)
                		tmp = Float64(1.0 * x);
                	elseif (z <= 5.3e-6)
                		tmp = Float64(Float64(y / t) * x);
                	else
                		tmp = Float64(1.0 * x);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (z <= -2.3e+20)
                		tmp = 1.0 * x;
                	elseif (z <= 5.3e-6)
                		tmp = (y / t) * x;
                	else
                		tmp = 1.0 * x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[z, -2.3e+20], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 5.3e-6], N[(N[(y / t), $MachinePrecision] * x), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -2.3 \cdot 10^{+20}:\\
                \;\;\;\;1 \cdot x\\
                
                \mathbf{elif}\;z \leq 5.3 \cdot 10^{-6}:\\
                \;\;\;\;\frac{y}{t} \cdot x\\
                
                \mathbf{else}:\\
                \;\;\;\;1 \cdot x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -2.3e20 or 5.3000000000000001e-6 < z

                  1. Initial program 74.5%

                    \[\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 rewrites55.0%

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

                    if -2.3e20 < z < 5.3000000000000001e-6

                    1. Initial program 94.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-/.f6494.0

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

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

                      \[\leadsto \color{blue}{\frac{y}{t}} \cdot x \]
                    6. Step-by-step derivation
                      1. lower-/.f6464.9

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

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

                  Alternative 9: 60.6% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+20}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-29}:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= z -1.3e+20) (* 1.0 x) (if (<= z 3.8e-29) (* (/ x t) y) (* 1.0 x))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.3e+20) {
                  		tmp = 1.0 * x;
                  	} else if (z <= 3.8e-29) {
                  		tmp = (x / t) * y;
                  	} else {
                  		tmp = 1.0 * x;
                  	}
                  	return tmp;
                  }
                  
                  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
                      real(8) :: tmp
                      if (z <= (-1.3d+20)) then
                          tmp = 1.0d0 * x
                      else if (z <= 3.8d-29) then
                          tmp = (x / t) * y
                      else
                          tmp = 1.0d0 * x
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (z <= -1.3e+20) {
                  		tmp = 1.0 * x;
                  	} else if (z <= 3.8e-29) {
                  		tmp = (x / t) * y;
                  	} else {
                  		tmp = 1.0 * x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if z <= -1.3e+20:
                  		tmp = 1.0 * x
                  	elif z <= 3.8e-29:
                  		tmp = (x / t) * y
                  	else:
                  		tmp = 1.0 * x
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (z <= -1.3e+20)
                  		tmp = Float64(1.0 * x);
                  	elseif (z <= 3.8e-29)
                  		tmp = Float64(Float64(x / t) * y);
                  	else
                  		tmp = Float64(1.0 * x);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (z <= -1.3e+20)
                  		tmp = 1.0 * x;
                  	elseif (z <= 3.8e-29)
                  		tmp = (x / t) * y;
                  	else
                  		tmp = 1.0 * x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[z, -1.3e+20], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 3.8e-29], N[(N[(x / t), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -1.3 \cdot 10^{+20}:\\
                  \;\;\;\;1 \cdot x\\
                  
                  \mathbf{elif}\;z \leq 3.8 \cdot 10^{-29}:\\
                  \;\;\;\;\frac{x}{t} \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;1 \cdot x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.3e20 or 3.79999999999999976e-29 < z

                    1. Initial program 75.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 rewrites54.6%

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

                      if -1.3e20 < z < 3.79999999999999976e-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-*.f6464.5

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

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

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

                      Alternative 10: 34.5% accurate, 3.8× speedup?

                      \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                      (FPCore (x y z t) :precision binary64 (* 1.0 x))
                      double code(double x, double y, double z, double t) {
                      	return 1.0 * x;
                      }
                      
                      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 = 1.0d0 * x
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return 1.0 * x;
                      }
                      
                      def code(x, y, z, t):
                      	return 1.0 * x
                      
                      function code(x, y, z, t)
                      	return Float64(1.0 * x)
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = 1.0 * x;
                      end
                      
                      code[x_, y_, z_, t_] := N[(1.0 * x), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      1 \cdot x
                      \end{array}
                      
                      Derivation
                      1. Initial program 84.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.9

                          \[\leadsto \color{blue}{\frac{y - z}{t - z}} \cdot x \]
                      4. Applied rewrites96.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 rewrites32.8%

                          \[\leadsto \color{blue}{1} \cdot x \]
                        2. Add Preprocessing

                        Developer Target 1: 97.1% 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 2024235 
                        (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)))