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

Percentage Accurate: 83.8% → 97.0%
Time: 9.4s
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: 83.8% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 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 85.6%

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

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

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

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

Alternative 2: 67.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t - z}\\ t_2 := x \cdot \frac{y - z}{t}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-128}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y (- t z)))) (t_2 (* x (/ (- y z) t))))
   (if (<= z -8.5e+98)
     x
     (if (<= z -1.7e-21)
       t_2
       (if (<= z -3.3e-113)
         t_1
         (if (<= z 8.4e-128) t_2 (if (<= z 5.4e+180) t_1 x)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / (t - z));
	double t_2 = x * ((y - z) / t);
	double tmp;
	if (z <= -8.5e+98) {
		tmp = x;
	} else if (z <= -1.7e-21) {
		tmp = t_2;
	} else if (z <= -3.3e-113) {
		tmp = t_1;
	} else if (z <= 8.4e-128) {
		tmp = t_2;
	} else if (z <= 5.4e+180) {
		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) :: t_2
    real(8) :: tmp
    t_1 = x * (y / (t - z))
    t_2 = x * ((y - z) / t)
    if (z <= (-8.5d+98)) then
        tmp = x
    else if (z <= (-1.7d-21)) then
        tmp = t_2
    else if (z <= (-3.3d-113)) then
        tmp = t_1
    else if (z <= 8.4d-128) then
        tmp = t_2
    else if (z <= 5.4d+180) 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 t_2 = x * ((y - z) / t);
	double tmp;
	if (z <= -8.5e+98) {
		tmp = x;
	} else if (z <= -1.7e-21) {
		tmp = t_2;
	} else if (z <= -3.3e-113) {
		tmp = t_1;
	} else if (z <= 8.4e-128) {
		tmp = t_2;
	} else if (z <= 5.4e+180) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / (t - z))
	t_2 = x * ((y - z) / t)
	tmp = 0
	if z <= -8.5e+98:
		tmp = x
	elif z <= -1.7e-21:
		tmp = t_2
	elif z <= -3.3e-113:
		tmp = t_1
	elif z <= 8.4e-128:
		tmp = t_2
	elif z <= 5.4e+180:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / Float64(t - z)))
	t_2 = Float64(x * Float64(Float64(y - z) / t))
	tmp = 0.0
	if (z <= -8.5e+98)
		tmp = x;
	elseif (z <= -1.7e-21)
		tmp = t_2;
	elseif (z <= -3.3e-113)
		tmp = t_1;
	elseif (z <= 8.4e-128)
		tmp = t_2;
	elseif (z <= 5.4e+180)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / (t - z));
	t_2 = x * ((y - z) / t);
	tmp = 0.0;
	if (z <= -8.5e+98)
		tmp = x;
	elseif (z <= -1.7e-21)
		tmp = t_2;
	elseif (z <= -3.3e-113)
		tmp = t_1;
	elseif (z <= 8.4e-128)
		tmp = t_2;
	elseif (z <= 5.4e+180)
		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]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+98], x, If[LessEqual[z, -1.7e-21], t$95$2, If[LessEqual[z, -3.3e-113], t$95$1, If[LessEqual[z, 8.4e-128], t$95$2, If[LessEqual[z, 5.4e+180], t$95$1, x]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-21}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 8.4 \cdot 10^{-128}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.4999999999999996e98 or 5.40000000000000033e180 < z

    1. Initial program 71.3%

      \[\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 74.7%

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

    if -8.4999999999999996e98 < z < -1.7e-21 or -3.3000000000000002e-113 < z < 8.4000000000000004e-128

    1. Initial program 89.7%

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

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

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

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

    if -1.7e-21 < z < -3.3000000000000002e-113 or 8.4000000000000004e-128 < z < 5.40000000000000033e180

    1. Initial program 93.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-113}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 74.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{\frac{t - z}{x}}\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{elif}\;z \leq -4 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.4000000000000005e-23

    1. Initial program 76.9%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub98.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{t}{y - z} - \frac{z}{y - z}}} \]
    5. Applied egg-rr98.6%

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

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

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

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

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

    if -7.4000000000000005e-23 < z < -3.99999999999999995e-159 or 1.60000000000000002e-124 < z < 9.50000000000000019e42

    1. Initial program 93.3%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub96.5%

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

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

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

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

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

    if -3.99999999999999995e-159 < z < 1.60000000000000002e-124

    1. Initial program 91.2%

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

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

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

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

    if 9.50000000000000019e42 < z

    1. Initial program 81.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-159}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-124}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{-z}{y - z}}\\ \end{array} \]

Alternative 4: 75.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
t_2 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-22}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8000000000000003e-22 or 5.20000000000000042e43 < z

    1. Initial program 78.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub99.1%

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

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

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

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

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

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

    if -5.8000000000000003e-22 < z < -3.2000000000000002e-113 or 5.6e-125 < z < 5.20000000000000042e43

    1. Initial program 94.2%

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

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

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

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

    if -3.2000000000000002e-113 < z < 5.6e-125

    1. Initial program 90.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-113}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+43}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \end{array} \]

Alternative 5: 74.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-160}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7999999999999998e-21 or 8.00000000000000011e43 < z

    1. Initial program 78.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub99.1%

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

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

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

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

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

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

    if -3.7999999999999998e-21 < z < -9.00000000000000053e-160 or 4.6000000000000002e-128 < z < 8.00000000000000011e43

    1. Initial program 93.3%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub96.5%

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

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

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

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

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

    if -9.00000000000000053e-160 < z < 4.6000000000000002e-128

    1. Initial program 91.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-160}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{\frac{t - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \end{array} \]

Alternative 6: 59.4% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-131}:\\
\;\;\;\;\frac{x}{\frac{-z}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.1999999999999999e98 or 7.49999999999999967e43 < z

    1. Initial program 76.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 66.8%

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

    if -5.1999999999999999e98 < z < -1.2999999999999999e-32

    1. Initial program 87.5%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{t}{x}}} \]
      3. associate-/r/48.5%

        \[\leadsto -\color{blue}{\frac{z}{t} \cdot x} \]
      4. distribute-rgt-neg-in48.5%

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

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

    if -1.2999999999999999e-32 < z < -1.1e-131

    1. Initial program 94.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-sub99.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{t}{y - z} - \frac{z}{y - z}}} \]
    5. Applied egg-rr99.6%

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{-1 \cdot z}{y}}} \]
      2. mul-1-neg55.2%

        \[\leadsto \frac{x}{\frac{\color{blue}{-z}}{y}} \]
    9. Simplified55.2%

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

    if -1.1e-131 < z < 7.49999999999999967e43

    1. Initial program 91.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-131}:\\ \;\;\;\;\frac{x}{\frac{-z}{y}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+43}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 61.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.1999999999999999e98 or 9.50000000000000019e42 < z

    1. Initial program 76.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 66.8%

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

    if -5.1999999999999999e98 < z < -3.9e-56

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot z} \]
      4. distribute-rgt-neg-in40.9%

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

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

    if -3.9e-56 < z < 9.50000000000000019e42

    1. Initial program 91.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-56}:\\ \;\;\;\;z \cdot \frac{-x}{t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 61.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8000000000000002e98 or 1.50000000000000008e43 < z

    1. Initial program 76.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 66.8%

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

    if -5.8000000000000002e98 < z < -3.99999999999999982e-57

    1. Initial program 88.5%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg42.9%

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{t}{x}}} \]
      3. associate-/r/45.7%

        \[\leadsto -\color{blue}{\frac{z}{t} \cdot x} \]
      4. distribute-rgt-neg-in45.7%

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

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

    if -3.99999999999999982e-57 < z < 1.50000000000000008e43

    1. Initial program 91.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+43}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 68.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.50000000000000023e101 or 5.40000000000000033e180 < z

    1. Initial program 71.3%

      \[\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 74.7%

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

    if -3.50000000000000023e101 < z < 5.40000000000000033e180

    1. Initial program 91.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+101}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 61.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4e98 or 2.99999999999999987e44 < z

    1. Initial program 76.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 66.8%

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

    if -5.4e98 < z < 2.99999999999999987e44

    1. Initial program 91.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 35.7% 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 85.6%

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

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

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

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

    \[\leadsto x \]

Developer target: 97.0% 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 2023257 
(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)))