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

Percentage Accurate: 84.1% → 97.4%
Time: 9.7s
Alternatives: 11
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 11 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.1% 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.4% 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.6%

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

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

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

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

Alternative 2: 67.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ \mathbf{if}\;z \leq -2.7 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+33}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+91}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+126} \lor \neg \left(z \leq 2.7 \cdot 10^{+155}\right) \land z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;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 -2.7e+119)
     x
     (if (<= z -8.2e-215)
       t_1
       (if (<= z 3.8e+33)
         (* (- y z) (/ x t))
         (if (<= z 1.45e+91)
           (/ z (/ z x))
           (if (or (<= z 6e+126) (and (not (<= z 2.7e+155)) (<= z 6.2e+188)))
             t_1
             x)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -2.7e+119) {
		tmp = x;
	} else if (z <= -8.2e-215) {
		tmp = t_1;
	} else if (z <= 3.8e+33) {
		tmp = (y - z) * (x / t);
	} else if (z <= 1.45e+91) {
		tmp = z / (z / x);
	} else if ((z <= 6e+126) || (!(z <= 2.7e+155) && (z <= 6.2e+188))) {
		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 <= (-2.7d+119)) then
        tmp = x
    else if (z <= (-8.2d-215)) then
        tmp = t_1
    else if (z <= 3.8d+33) then
        tmp = (y - z) * (x / t)
    else if (z <= 1.45d+91) then
        tmp = z / (z / x)
    else if ((z <= 6d+126) .or. (.not. (z <= 2.7d+155)) .and. (z <= 6.2d+188)) 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 <= -2.7e+119) {
		tmp = x;
	} else if (z <= -8.2e-215) {
		tmp = t_1;
	} else if (z <= 3.8e+33) {
		tmp = (y - z) * (x / t);
	} else if (z <= 1.45e+91) {
		tmp = z / (z / x);
	} else if ((z <= 6e+126) || (!(z <= 2.7e+155) && (z <= 6.2e+188))) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	tmp = 0
	if z <= -2.7e+119:
		tmp = x
	elif z <= -8.2e-215:
		tmp = t_1
	elif z <= 3.8e+33:
		tmp = (y - z) * (x / t)
	elif z <= 1.45e+91:
		tmp = z / (z / x)
	elif (z <= 6e+126) or (not (z <= 2.7e+155) and (z <= 6.2e+188)):
		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 <= -2.7e+119)
		tmp = x;
	elseif (z <= -8.2e-215)
		tmp = t_1;
	elseif (z <= 3.8e+33)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 1.45e+91)
		tmp = Float64(z / Float64(z / x));
	elseif ((z <= 6e+126) || (!(z <= 2.7e+155) && (z <= 6.2e+188)))
		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 <= -2.7e+119)
		tmp = x;
	elseif (z <= -8.2e-215)
		tmp = t_1;
	elseif (z <= 3.8e+33)
		tmp = (y - z) * (x / t);
	elseif (z <= 1.45e+91)
		tmp = z / (z / x);
	elseif ((z <= 6e+126) || (~((z <= 2.7e+155)) && (z <= 6.2e+188)))
		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, -2.7e+119], x, If[LessEqual[z, -8.2e-215], t$95$1, If[LessEqual[z, 3.8e+33], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+91], N[(z / N[(z / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6e+126], And[N[Not[LessEqual[z, 2.7e+155]], $MachinePrecision], LessEqual[z, 6.2e+188]]], t$95$1, x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-215}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+91}:\\
\;\;\;\;\frac{z}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+126} \lor \neg \left(z \leq 2.7 \cdot 10^{+155}\right) \land z \leq 6.2 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.6999999999999998e119 or 6.0000000000000005e126 < z < 2.69999999999999994e155 or 6.2000000000000004e188 < z

    1. Initial program 72.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/99.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. Taylor expanded in z around inf 76.2%

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

    if -2.6999999999999998e119 < z < -8.1999999999999997e-215 or 1.45000000000000007e91 < z < 6.0000000000000005e126 or 2.69999999999999994e155 < z < 6.2000000000000004e188

    1. Initial program 86.8%

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

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

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

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

    if -8.1999999999999997e-215 < z < 3.80000000000000002e33

    1. Initial program 94.3%

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

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

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

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

    if 3.80000000000000002e33 < z < 1.45000000000000007e91

    1. Initial program 88.3%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/87.3%

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-87.3%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in x around 0 75.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-215}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+33}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+91}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+126} \lor \neg \left(z \leq 2.7 \cdot 10^{+155}\right) \land z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 67.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ \mathbf{if}\;z \leq -1.28 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+36}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+155}:\\ \;\;\;\;\frac{x}{1 + \frac{y}{z}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;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 -1.28e+123)
     x
     (if (<= z -2.7e-213)
       t_1
       (if (<= z 8.5e+36)
         (* (- y z) (/ x t))
         (if (<= z 7.2e+89)
           (/ z (/ z x))
           (if (<= z 6e+126)
             t_1
             (if (<= z 2.1e+155)
               (/ x (+ 1.0 (/ y z)))
               (if (<= z 6.2e+188) t_1 x)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -1.28e+123) {
		tmp = x;
	} else if (z <= -2.7e-213) {
		tmp = t_1;
	} else if (z <= 8.5e+36) {
		tmp = (y - z) * (x / t);
	} else if (z <= 7.2e+89) {
		tmp = z / (z / x);
	} else if (z <= 6e+126) {
		tmp = t_1;
	} else if (z <= 2.1e+155) {
		tmp = x / (1.0 + (y / z));
	} else if (z <= 6.2e+188) {
		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 <= (-1.28d+123)) then
        tmp = x
    else if (z <= (-2.7d-213)) then
        tmp = t_1
    else if (z <= 8.5d+36) then
        tmp = (y - z) * (x / t)
    else if (z <= 7.2d+89) then
        tmp = z / (z / x)
    else if (z <= 6d+126) then
        tmp = t_1
    else if (z <= 2.1d+155) then
        tmp = x / (1.0d0 + (y / z))
    else if (z <= 6.2d+188) 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 <= -1.28e+123) {
		tmp = x;
	} else if (z <= -2.7e-213) {
		tmp = t_1;
	} else if (z <= 8.5e+36) {
		tmp = (y - z) * (x / t);
	} else if (z <= 7.2e+89) {
		tmp = z / (z / x);
	} else if (z <= 6e+126) {
		tmp = t_1;
	} else if (z <= 2.1e+155) {
		tmp = x / (1.0 + (y / z));
	} else if (z <= 6.2e+188) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	tmp = 0
	if z <= -1.28e+123:
		tmp = x
	elif z <= -2.7e-213:
		tmp = t_1
	elif z <= 8.5e+36:
		tmp = (y - z) * (x / t)
	elif z <= 7.2e+89:
		tmp = z / (z / x)
	elif z <= 6e+126:
		tmp = t_1
	elif z <= 2.1e+155:
		tmp = x / (1.0 + (y / z))
	elif z <= 6.2e+188:
		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 <= -1.28e+123)
		tmp = x;
	elseif (z <= -2.7e-213)
		tmp = t_1;
	elseif (z <= 8.5e+36)
		tmp = Float64(Float64(y - z) * Float64(x / t));
	elseif (z <= 7.2e+89)
		tmp = Float64(z / Float64(z / x));
	elseif (z <= 6e+126)
		tmp = t_1;
	elseif (z <= 2.1e+155)
		tmp = Float64(x / Float64(1.0 + Float64(y / z)));
	elseif (z <= 6.2e+188)
		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 <= -1.28e+123)
		tmp = x;
	elseif (z <= -2.7e-213)
		tmp = t_1;
	elseif (z <= 8.5e+36)
		tmp = (y - z) * (x / t);
	elseif (z <= 7.2e+89)
		tmp = z / (z / x);
	elseif (z <= 6e+126)
		tmp = t_1;
	elseif (z <= 2.1e+155)
		tmp = x / (1.0 + (y / z));
	elseif (z <= 6.2e+188)
		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, -1.28e+123], x, If[LessEqual[z, -2.7e-213], t$95$1, If[LessEqual[z, 8.5e+36], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+89], N[(z / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+126], t$95$1, If[LessEqual[z, 2.1e+155], N[(x / N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+188], t$95$1, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-213}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{z}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+155}:\\
\;\;\;\;\frac{x}{1 + \frac{y}{z}}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.28000000000000005e123 or 6.2000000000000004e188 < z

    1. Initial program 71.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/99.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. Taylor expanded in z around inf 76.7%

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

    if -1.28000000000000005e123 < z < -2.7000000000000001e-213 or 7.2e89 < z < 6.0000000000000005e126 or 2.1e155 < z < 6.2000000000000004e188

    1. Initial program 86.8%

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

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

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

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

    if -2.7000000000000001e-213 < z < 8.50000000000000014e36

    1. Initial program 94.3%

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

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

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

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

    if 8.50000000000000014e36 < z < 7.2e89

    1. Initial program 88.3%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/87.3%

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-87.3%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in x around 0 75.7%

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

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

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

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

    if 6.0000000000000005e126 < z < 2.1e155

    1. Initial program 78.8%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{z}{y - z}}} \]
    5. Step-by-step derivation
      1. neg-mul-178.8%

        \[\leadsto \frac{x}{\color{blue}{-\frac{z}{y - z}}} \]
      2. distribute-neg-frac78.8%

        \[\leadsto \frac{x}{\color{blue}{\frac{-z}{y - z}}} \]
    6. Simplified78.8%

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

      \[\leadsto \frac{x}{\color{blue}{1 + \frac{y}{z}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-213}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+36}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+155}:\\ \;\;\;\;\frac{x}{1 + \frac{y}{z}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 68.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.9 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+126} \lor \neg \left(z \leq 9.5 \cdot 10^{+154}\right) \land z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;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 -5.5e+118)
     x
     (if (<= z 7.9e+34)
       t_1
       (if (<= z 3.9e+89)
         (/ z (/ z x))
         (if (or (<= z 6.2e+126) (and (not (<= z 9.5e+154)) (<= z 6.2e+188)))
           t_1
           x))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double tmp;
	if (z <= -5.5e+118) {
		tmp = x;
	} else if (z <= 7.9e+34) {
		tmp = t_1;
	} else if (z <= 3.9e+89) {
		tmp = z / (z / x);
	} else if ((z <= 6.2e+126) || (!(z <= 9.5e+154) && (z <= 6.2e+188))) {
		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 <= (-5.5d+118)) then
        tmp = x
    else if (z <= 7.9d+34) then
        tmp = t_1
    else if (z <= 3.9d+89) then
        tmp = z / (z / x)
    else if ((z <= 6.2d+126) .or. (.not. (z <= 9.5d+154)) .and. (z <= 6.2d+188)) 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 <= -5.5e+118) {
		tmp = x;
	} else if (z <= 7.9e+34) {
		tmp = t_1;
	} else if (z <= 3.9e+89) {
		tmp = z / (z / x);
	} else if ((z <= 6.2e+126) || (!(z <= 9.5e+154) && (z <= 6.2e+188))) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	tmp = 0
	if z <= -5.5e+118:
		tmp = x
	elif z <= 7.9e+34:
		tmp = t_1
	elif z <= 3.9e+89:
		tmp = z / (z / x)
	elif (z <= 6.2e+126) or (not (z <= 9.5e+154) and (z <= 6.2e+188)):
		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 <= -5.5e+118)
		tmp = x;
	elseif (z <= 7.9e+34)
		tmp = t_1;
	elseif (z <= 3.9e+89)
		tmp = Float64(z / Float64(z / x));
	elseif ((z <= 6.2e+126) || (!(z <= 9.5e+154) && (z <= 6.2e+188)))
		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 <= -5.5e+118)
		tmp = x;
	elseif (z <= 7.9e+34)
		tmp = t_1;
	elseif (z <= 3.9e+89)
		tmp = z / (z / x);
	elseif ((z <= 6.2e+126) || (~((z <= 9.5e+154)) && (z <= 6.2e+188)))
		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, -5.5e+118], x, If[LessEqual[z, 7.9e+34], t$95$1, If[LessEqual[z, 3.9e+89], N[(z / N[(z / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6.2e+126], And[N[Not[LessEqual[z, 9.5e+154]], $MachinePrecision], LessEqual[z, 6.2e+188]]], t$95$1, x]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7.9 \cdot 10^{+34}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+89}:\\
\;\;\;\;\frac{z}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+126} \lor \neg \left(z \leq 9.5 \cdot 10^{+154}\right) \land z \leq 6.2 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000003e118 or 6.2e126 < z < 9.5000000000000001e154 or 6.2000000000000004e188 < z

    1. Initial program 72.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/99.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. Taylor expanded in z around inf 76.2%

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

    if -5.5000000000000003e118 < z < 7.89999999999999997e34 or 3.90000000000000011e89 < z < 6.2e126 or 9.5000000000000001e154 < z < 6.2000000000000004e188

    1. Initial program 90.8%

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

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

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

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

    if 7.89999999999999997e34 < z < 3.90000000000000011e89

    1. Initial program 88.3%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/87.3%

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-87.3%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in x around 0 75.7%

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{z}{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.9 \cdot 10^{+34}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+126} \lor \neg \left(z \leq 9.5 \cdot 10^{+154}\right) \land z \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 75.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

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

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

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


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

    1. Initial program 76.2%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/79.0%

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-79.0%

        \[\leadsto \frac{x}{\frac{\color{blue}{\left(0 - t\right) + z}}{z}} \]
      5. neg-sub079.0%

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in t around 0 79.1%

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

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

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

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

    if -4.3e14 < z < -1.13999999999999995e-275

    1. Initial program 91.5%

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

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

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

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

    if -1.13999999999999995e-275 < z < 8.0000000000000003e-83

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000003e-83 < z

    1. Initial program 82.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+14}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.14 \cdot 10^{-275}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-83}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \frac{z}{t - z}\\ \end{array} \]

Alternative 6: 75.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - \frac{t}{z}}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-276}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (- 1.0 (/ t z)))))
   (if (<= z -4.5e+15)
     t_1
     (if (<= z -1.45e-276)
       (/ x (/ (- t z) y))
       (if (<= z 4.5e-82) (/ y (/ (- t z) x)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (1.0 - (t / z));
	double tmp;
	if (z <= -4.5e+15) {
		tmp = t_1;
	} else if (z <= -1.45e-276) {
		tmp = x / ((t - z) / y);
	} else if (z <= 4.5e-82) {
		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 = x / (1.0d0 - (t / z))
    if (z <= (-4.5d+15)) then
        tmp = t_1
    else if (z <= (-1.45d-276)) then
        tmp = x / ((t - z) / y)
    else if (z <= 4.5d-82) 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 = x / (1.0 - (t / z));
	double tmp;
	if (z <= -4.5e+15) {
		tmp = t_1;
	} else if (z <= -1.45e-276) {
		tmp = x / ((t - z) / y);
	} else if (z <= 4.5e-82) {
		tmp = y / ((t - z) / x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (1.0 - (t / z))
	tmp = 0
	if z <= -4.5e+15:
		tmp = t_1
	elif z <= -1.45e-276:
		tmp = x / ((t - z) / y)
	elif z <= 4.5e-82:
		tmp = y / ((t - z) / x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(1.0 - Float64(t / z)))
	tmp = 0.0
	if (z <= -4.5e+15)
		tmp = t_1;
	elseif (z <= -1.45e-276)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	elseif (z <= 4.5e-82)
		tmp = Float64(y / Float64(Float64(t - z) / x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (1.0 - (t / z));
	tmp = 0.0;
	if (z <= -4.5e+15)
		tmp = t_1;
	elseif (z <= -1.45e-276)
		tmp = x / ((t - z) / y);
	elseif (z <= 4.5e-82)
		tmp = y / ((t - z) / x);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+15], t$95$1, If[LessEqual[z, -1.45e-276], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-82], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5e15 or 4.4999999999999998e-82 < z

    1. Initial program 80.3%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/76.3%

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-76.3%

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in t around 0 76.3%

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

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

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

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

    if -4.5e15 < z < -1.44999999999999994e-276

    1. Initial program 91.5%

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

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

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

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

    if -1.44999999999999994e-276 < z < 4.4999999999999998e-82

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-276}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \end{array} \]

Alternative 7: 75.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+14} \lor \neg \left(z \leq 2.6 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5e14 or 2.5999999999999999e-81 < z

    1. Initial program 80.2%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \frac{t - z}{z}}} \]
    5. Step-by-step derivation
      1. associate-*r/76.7%

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

        \[\leadsto \frac{x}{\frac{\color{blue}{-\left(t - z\right)}}{z}} \]
      3. neg-sub076.7%

        \[\leadsto \frac{x}{\frac{\color{blue}{0 - \left(t - z\right)}}{z}} \]
      4. associate--r-76.7%

        \[\leadsto \frac{x}{\frac{\color{blue}{\left(0 - t\right) + z}}{z}} \]
      5. neg-sub076.7%

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\left(-t\right) + z}{z}}} \]
    7. Taylor expanded in t around 0 76.8%

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

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

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

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

    if -5e14 < z < 2.5999999999999999e-81

    1. Initial program 92.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+14} \lor \neg \left(z \leq 2.6 \cdot 10^{-81}\right):\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \]

Alternative 8: 40.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-127}:\\
\;\;\;\;z \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e-94 or 1.8500000000000002e-127 < z

    1. Initial program 80.6%

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

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

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

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

    if -1.2e-94 < z < 1.8500000000000002e-127

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \left(-z\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u28.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t} \cdot \left(-z\right)\right)\right)} \]
      2. expm1-udef24.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \left(-z\right)\right)} - 1} \]
      3. add-sqr-sqrt15.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}\right)} - 1 \]
      4. sqrt-unprod22.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} - 1 \]
      5. sqr-neg22.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \sqrt{\color{blue}{z \cdot z}}\right)} - 1 \]
      6. sqrt-unprod12.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}\right)} - 1 \]
      7. add-sqr-sqrt23.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{t} \cdot \color{blue}{z}\right)} - 1 \]
      8. *-commutative23.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{z \cdot \frac{x}{t}}\right)} - 1 \]
    9. Applied egg-rr23.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(z \cdot \frac{x}{t}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def23.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(z \cdot \frac{x}{t}\right)\right)} \]
      2. expm1-log1p30.7%

        \[\leadsto \color{blue}{z \cdot \frac{x}{t}} \]
    11. Simplified30.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-94}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-127}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 60.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2e14 or 9.49999999999999917e-81 < z

    1. Initial program 79.8%

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

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

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

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

    if -3.2e14 < z < 9.49999999999999917e-81

    1. Initial program 92.9%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{t}{y}}} \]
    5. Step-by-step derivation
      1. associate-/r/71.6%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    6. Applied egg-rr71.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-81}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 61.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.74999999999999998e112 or 2.1e30 < z

    1. Initial program 76.5%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. associate-*r/99.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. Taylor expanded in z around inf 63.3%

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

    if -1.74999999999999998e112 < z < 2.1e30

    1. Initial program 92.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 35.5% 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 84.6%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification37.1%

    \[\leadsto x \]

Developer target: 97.3% 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 2023196 
(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)))