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

Percentage Accurate: 84.4% → 96.3%
Time: 13.5s
Alternatives: 14
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 14 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.4% 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.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{-13} \lor \neg \left(z \leq 1.55 \cdot 10^{-231}\right):\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.02e-13) (not (<= z 1.55e-231)))
   (* x (/ (- y z) (- t z)))
   (* (- y z) (/ x (- t z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.02e-13) || !(z <= 1.55e-231)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = (y - z) * (x / (t - z));
	}
	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.02d-13)) .or. (.not. (z <= 1.55d-231))) then
        tmp = x * ((y - z) / (t - z))
    else
        tmp = (y - z) * (x / (t - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.02e-13) || !(z <= 1.55e-231)) {
		tmp = x * ((y - z) / (t - z));
	} else {
		tmp = (y - z) * (x / (t - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.02e-13) or not (z <= 1.55e-231):
		tmp = x * ((y - z) / (t - z))
	else:
		tmp = (y - z) * (x / (t - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.02e-13) || !(z <= 1.55e-231))
		tmp = Float64(x * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.02e-13) || ~((z <= 1.55e-231)))
		tmp = x * ((y - z) / (t - z));
	else
		tmp = (y - z) * (x / (t - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.02e-13], N[Not[LessEqual[z, 1.55e-231]], $MachinePrecision]], N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-13} \lor \neg \left(z \leq 1.55 \cdot 10^{-231}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0199999999999999e-13 or 1.54999999999999994e-231 < z

    1. Initial program 76.5%

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

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

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

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

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

    if -1.0199999999999999e-13 < z < 1.54999999999999994e-231

    1. Initial program 87.3%

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

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

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

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

Alternative 2: 69.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-232}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.80000000000000015e24 or 8.4999999999999996e49 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    if -3.80000000000000015e24 < z < -1.05e-232 or 1.5200000000000001e-295 < z < 2.5999999999999998e-100

    1. Initial program 88.7%

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

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

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

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

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

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

    if -1.05e-232 < z < 1.5200000000000001e-295

    1. Initial program 95.4%

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

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

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

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

    if 2.5999999999999998e-100 < z < 8.4999999999999996e49

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-232}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{-295}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-100}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 69.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-229}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-296}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-103}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -3.5e+24)
   x
   (if (<= z -9.2e-229)
     (/ x (/ (- t z) y))
     (if (<= z 1.5e-296)
       (* (- y z) (/ x t))
       (if (<= z 5.5e-103)
         (* x (/ y (- t z)))
         (if (<= z 1.4e+50) (* x (/ (- y z) t)) x))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.5e+24) {
		tmp = x;
	} else if (z <= -9.2e-229) {
		tmp = x / ((t - z) / y);
	} else if (z <= 1.5e-296) {
		tmp = (y - z) * (x / t);
	} else if (z <= 5.5e-103) {
		tmp = x * (y / (t - z));
	} else if (z <= 1.4e+50) {
		tmp = x * ((y - z) / t);
	} else {
		tmp = 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 <= (-3.5d+24)) then
        tmp = x
    else if (z <= (-9.2d-229)) then
        tmp = x / ((t - z) / y)
    else if (z <= 1.5d-296) then
        tmp = (y - z) * (x / t)
    else if (z <= 5.5d-103) then
        tmp = x * (y / (t - z))
    else if (z <= 1.4d+50) then
        tmp = x * ((y - z) / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.5e+24) {
		tmp = x;
	} else if (z <= -9.2e-229) {
		tmp = x / ((t - z) / y);
	} else if (z <= 1.5e-296) {
		tmp = (y - z) * (x / t);
	} else if (z <= 5.5e-103) {
		tmp = x * (y / (t - z));
	} else if (z <= 1.4e+50) {
		tmp = x * ((y - z) / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -3.5e+24:
		tmp = x
	elif z <= -9.2e-229:
		tmp = x / ((t - z) / y)
	elif z <= 1.5e-296:
		tmp = (y - z) * (x / t)
	elif z <= 5.5e-103:
		tmp = x * (y / (t - z))
	elif z <= 1.4e+50:
		tmp = x * ((y - z) / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -3.5e+24)
		tmp = x;
	elseif (z <= -9.2e-229)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	elseif (z <= 1.5e-296)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 5.5e-103)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (z <= 1.4e+50)
		tmp = Float64(x * Float64(Float64(y - z) / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -3.5e+24)
		tmp = x;
	elseif (z <= -9.2e-229)
		tmp = x / ((t - z) / y);
	elseif (z <= 1.5e-296)
		tmp = (y - z) * (x / t);
	elseif (z <= 5.5e-103)
		tmp = x * (y / (t - z));
	elseif (z <= 1.4e+50)
		tmp = x * ((y - z) / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+24], x, If[LessEqual[z, -9.2e-229], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-296], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-103], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+50], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+24}:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.5000000000000002e24 or 1.3999999999999999e50 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    if -3.5000000000000002e24 < z < -9.19999999999999983e-229

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

    if -9.19999999999999983e-229 < z < 1.4999999999999999e-296

    1. Initial program 95.4%

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

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

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

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

    if 1.4999999999999999e-296 < z < 5.50000000000000032e-103

    1. Initial program 84.4%

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

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

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

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

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

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

    if 5.50000000000000032e-103 < z < 1.3999999999999999e50

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-229}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-296}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-103}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+156}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+161}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.5999999999999997e156 or 3.39999999999999993e161 < z

    1. Initial program 58.3%

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

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

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

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

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

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

    if -6.5999999999999997e156 < z < -3.8e-6 or 6.8000000000000001e49 < z < 3.39999999999999993e161

    1. Initial program 81.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z}} \cdot \left(y - z\right) \]
      2. neg-mul-167.8%

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

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

    if -3.8e-6 < z < 1.59999999999999988e-103

    1. Initial program 89.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      3. add-cube-cbrt80.8%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{t - z}{x}} \]
      4. *-un-lft-identity80.8%

        \[\leadsto \frac{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}{\color{blue}{1 \cdot \frac{t - z}{x}}} \]
      5. times-frac80.8%

        \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
      6. pow280.8%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{y}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}} \]
    7. Applied egg-rr80.8%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
    8. Step-by-step derivation
      1. /-rgt-identity80.8%

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{t - z}{x}} \]
      4. rem-3cbrt-lft81.6%

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

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

    if 1.59999999999999988e-103 < z < 6.8000000000000001e49

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+156}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-103}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+49}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+160}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.80000000000000015e24 or 7.80000000000000014e160 < z

    1. Initial program 63.3%

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

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

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

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

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

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

    if -3.80000000000000015e24 < z < 1.4000000000000001e-36 or 2.7000000000000001e49 < z < 7.80000000000000014e160

    1. Initial program 89.1%

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

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

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

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

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

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

    if 1.4000000000000001e-36 < z < 2.7000000000000001e49

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+49}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-103}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.3e+23)
   x
   (if (<= z 1.5e-103)
     (* x (/ y (- t z)))
     (if (<= z 8.5e+49) (* x (/ (- y z) t)) x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.3e+23) {
		tmp = x;
	} else if (z <= 1.5e-103) {
		tmp = x * (y / (t - z));
	} else if (z <= 8.5e+49) {
		tmp = x * ((y - z) / t);
	} else {
		tmp = 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+23)) then
        tmp = x
    else if (z <= 1.5d-103) then
        tmp = x * (y / (t - z))
    else if (z <= 8.5d+49) then
        tmp = x * ((y - z) / t)
    else
        tmp = 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+23) {
		tmp = x;
	} else if (z <= 1.5e-103) {
		tmp = x * (y / (t - z));
	} else if (z <= 8.5e+49) {
		tmp = x * ((y - z) / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.3e+23:
		tmp = x
	elif z <= 1.5e-103:
		tmp = x * (y / (t - z))
	elif z <= 8.5e+49:
		tmp = x * ((y - z) / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.3e+23)
		tmp = x;
	elseif (z <= 1.5e-103)
		tmp = Float64(x * Float64(y / Float64(t - z)));
	elseif (z <= 8.5e+49)
		tmp = Float64(x * Float64(Float64(y - z) / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.3e+23)
		tmp = x;
	elseif (z <= 1.5e-103)
		tmp = x * (y / (t - z));
	elseif (z <= 8.5e+49)
		tmp = x * ((y - z) / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.3e+23], x, If[LessEqual[z, 1.5e-103], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+49], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+23}:\\
\;\;\;\;x\\

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

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.3e23 or 8.4999999999999996e49 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    if -2.3e23 < z < 1.5e-103

    1. Initial program 89.8%

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

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

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

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

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

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

    if 1.5e-103 < z < 8.4999999999999996e49

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-103}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 68.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;x\\

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

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.80000000000000015e24 or 3.7999999999999999e49 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    if -3.80000000000000015e24 < z < 5.59999999999999991e-100

    1. Initial program 89.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      3. add-cube-cbrt80.5%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{t - z}{x}} \]
      4. *-un-lft-identity80.5%

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

        \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
      6. pow280.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{y}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}} \]
    7. Applied egg-rr80.5%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
    8. Step-by-step derivation
      1. /-rgt-identity80.5%

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{t - z}{x}} \]
      4. rem-3cbrt-lft81.3%

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

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

    if 5.59999999999999991e-100 < z < 3.7999999999999999e49

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-100}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-117}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -8.5e+23)
   x
   (if (<= z 3.5e-117)
     (/ y (/ (- t z) x))
     (if (<= z 1.35e+50) (/ (* x (- y z)) t) x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.5e+23) {
		tmp = x;
	} else if (z <= 3.5e-117) {
		tmp = y / ((t - z) / x);
	} else if (z <= 1.35e+50) {
		tmp = (x * (y - z)) / t;
	} else {
		tmp = 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 <= (-8.5d+23)) then
        tmp = x
    else if (z <= 3.5d-117) then
        tmp = y / ((t - z) / x)
    else if (z <= 1.35d+50) then
        tmp = (x * (y - z)) / t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.5e+23) {
		tmp = x;
	} else if (z <= 3.5e-117) {
		tmp = y / ((t - z) / x);
	} else if (z <= 1.35e+50) {
		tmp = (x * (y - z)) / t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -8.5e+23:
		tmp = x
	elif z <= 3.5e-117:
		tmp = y / ((t - z) / x)
	elif z <= 1.35e+50:
		tmp = (x * (y - z)) / t
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8.5e+23)
		tmp = x;
	elseif (z <= 3.5e-117)
		tmp = Float64(y / Float64(Float64(t - z) / x));
	elseif (z <= 1.35e+50)
		tmp = Float64(Float64(x * Float64(y - z)) / t);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8.5e+23)
		tmp = x;
	elseif (z <= 3.5e-117)
		tmp = y / ((t - z) / x);
	elseif (z <= 1.35e+50)
		tmp = (x * (y - z)) / t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.5e+23], x, If[LessEqual[z, 3.5e-117], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+50], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+23}:\\
\;\;\;\;x\\

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

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5000000000000001e23 or 1.35e50 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    if -8.5000000000000001e23 < z < 3.4999999999999998e-117

    1. Initial program 89.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - z}{x}}} \]
      3. add-cube-cbrt80.5%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{t - z}{x}} \]
      4. *-un-lft-identity80.5%

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

        \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
      6. pow280.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{y}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}} \]
    7. Applied egg-rr80.5%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t - z}{x}}} \]
    8. Step-by-step derivation
      1. /-rgt-identity80.5%

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{t - z}{x}} \]
      4. rem-3cbrt-lft81.3%

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

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

    if 3.4999999999999998e-117 < z < 1.35e50

    1. Initial program 93.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-117}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-8}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

\mathbf{else}:\\
\;\;\;\;x\\


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

    1. Initial program 67.0%

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

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

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

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

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

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

    if -4.79999999999999997e-8 < z < 3.09999999999999993e-37

    1. Initial program 89.8%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt90.6%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \frac{y - z}{t - z}}\right)}^{3}} \]
    7. Taylor expanded in z around 0 58.5%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{x \cdot y}{t}} \]
    8. Step-by-step derivation
      1. pow-base-158.5%

        \[\leadsto \color{blue}{1} \cdot \frac{x \cdot y}{t} \]
      2. *-lft-identity58.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
      3. associate-/l*61.6%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
      4. associate-/r/63.5%

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

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

    if 3.09999999999999993e-37 < z < 1.59999999999999991e50

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+50}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -6e-8)
   x
   (if (<= z 2.25e-37) (* y (/ x t)) (if (<= z 1.7e+50) (/ (- x) (/ t z)) x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6e-8) {
		tmp = x;
	} else if (z <= 2.25e-37) {
		tmp = y * (x / t);
	} else if (z <= 1.7e+50) {
		tmp = -x / (t / z);
	} else {
		tmp = 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 <= (-6d-8)) then
        tmp = x
    else if (z <= 2.25d-37) then
        tmp = y * (x / t)
    else if (z <= 1.7d+50) then
        tmp = -x / (t / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6e-8) {
		tmp = x;
	} else if (z <= 2.25e-37) {
		tmp = y * (x / t);
	} else if (z <= 1.7e+50) {
		tmp = -x / (t / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -6e-8:
		tmp = x
	elif z <= 2.25e-37:
		tmp = y * (x / t)
	elif z <= 1.7e+50:
		tmp = -x / (t / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -6e-8)
		tmp = x;
	elseif (z <= 2.25e-37)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= 1.7e+50)
		tmp = Float64(Float64(-x) / Float64(t / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -6e-8)
		tmp = x;
	elseif (z <= 2.25e-37)
		tmp = y * (x / t);
	elseif (z <= 1.7e+50)
		tmp = -x / (t / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -6e-8], x, If[LessEqual[z, 2.25e-37], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+50], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-8}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x\\


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

    1. Initial program 67.0%

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

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

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

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

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

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

    if -5.99999999999999946e-8 < z < 2.2500000000000002e-37

    1. Initial program 89.8%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt90.6%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \frac{y - z}{t - z}}\right)}^{3}} \]
    7. Taylor expanded in z around 0 58.5%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{x \cdot y}{t}} \]
    8. Step-by-step derivation
      1. pow-base-158.5%

        \[\leadsto \color{blue}{1} \cdot \frac{x \cdot y}{t} \]
      2. *-lft-identity58.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
      3. associate-/l*61.6%

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
      4. associate-/r/63.5%

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

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

    if 2.2500000000000002e-37 < z < 1.6999999999999999e50

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+50}:\\ \;\;\;\;\frac{-x}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -165000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -165000000.0) x (if (<= z 5.1e-20) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -165000000.0) {
		tmp = x;
	} else if (z <= 5.1e-20) {
		tmp = x * (y / t);
	} else {
		tmp = 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 <= (-165000000.0d0)) then
        tmp = x
    else if (z <= 5.1d-20) then
        tmp = x * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -165000000.0) {
		tmp = x;
	} else if (z <= 5.1e-20) {
		tmp = x * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -165000000.0:
		tmp = x
	elif z <= 5.1e-20:
		tmp = x * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -165000000.0)
		tmp = x;
	elseif (z <= 5.1e-20)
		tmp = Float64(x * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -165000000.0)
		tmp = x;
	elseif (z <= 5.1e-20)
		tmp = x * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -165000000.0], x, If[LessEqual[z, 5.1e-20], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -165000000:\\
\;\;\;\;x\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e8 or 5.10000000000000019e-20 < z

    1. Initial program 68.7%

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

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

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

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

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

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

    if -1.65e8 < z < 5.10000000000000019e-20

    1. Initial program 90.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -165000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 61.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-20}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.05e-7) x (if (<= z 9.6e-20) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e-7) {
		tmp = x;
	} else if (z <= 9.6e-20) {
		tmp = y * (x / t);
	} else {
		tmp = 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.05d-7)) then
        tmp = x
    else if (z <= 9.6d-20) then
        tmp = y * (x / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e-7) {
		tmp = x;
	} else if (z <= 9.6e-20) {
		tmp = y * (x / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.05e-7:
		tmp = x
	elif z <= 9.6e-20:
		tmp = y * (x / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.05e-7)
		tmp = x;
	elseif (z <= 9.6e-20)
		tmp = Float64(y * Float64(x / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.05e-7)
		tmp = x;
	elseif (z <= 9.6e-20)
		tmp = y * (x / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05e-7], x, If[LessEqual[z, 9.6e-20], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-7}:\\
\;\;\;\;x\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05e-7 or 9.59999999999999971e-20 < z

    1. Initial program 69.0%

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

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

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

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

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

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

    if -1.05e-7 < z < 9.59999999999999971e-20

    1. Initial program 90.1%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt90.9%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \frac{y - z}{t - z}}\right)}^{3}} \]
    7. Taylor expanded in z around 0 57.9%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{x \cdot y}{t}} \]
    8. Step-by-step derivation
      1. pow-base-157.9%

        \[\leadsto \color{blue}{1} \cdot \frac{x \cdot y}{t} \]
      2. *-lft-identity57.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
      4. associate-/r/62.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-20}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 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 80.3%

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

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

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

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

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

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

Alternative 14: 36.0% accurate, 9.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
	return 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 = x
end function
public static double code(double x, double y, double z, double t) {
	return x;
}
def code(x, y, z, t):
	return x
function code(x, y, z, t)
	return x
end
function tmp = code(x, y, z, t)
	tmp = x;
end
code[x_, y_, z_, t_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 80.3%

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

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

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

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

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.2% accurate, 1.0× speedup?

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

\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}

Reproduce

?
herbie shell --seed 2024021 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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