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

Percentage Accurate: 84.4% → 97.2%
Time: 9.0s
Alternatives: 13
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 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 84.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.2% 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 82.5%

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

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

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

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

Alternative 2: 59.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -8.5e+38)
   x
   (if (<= z 1.3e-25)
     (/ x (/ t y))
     (if (<= z 2.5e+16) x (if (<= z 1.08e+175) (* (/ x t) (- z)) x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.5e+38) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 2.5e+16) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = (x / t) * -z;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-8.5d+38)) then
        tmp = x
    else if (z <= 1.3d-25) then
        tmp = x / (t / y)
    else if (z <= 2.5d+16) then
        tmp = x
    else if (z <= 1.08d+175) then
        tmp = (x / t) * -z
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.5e+38) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 2.5e+16) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = (x / t) * -z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -8.5e+38:
		tmp = x
	elif z <= 1.3e-25:
		tmp = x / (t / y)
	elif z <= 2.5e+16:
		tmp = x
	elif z <= 1.08e+175:
		tmp = (x / t) * -z
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8.5e+38)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = Float64(x / Float64(t / y));
	elseif (z <= 2.5e+16)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = Float64(Float64(x / t) * Float64(-z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8.5e+38)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = x / (t / y);
	elseif (z <= 2.5e+16)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = (x / t) * -z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.5e+38], x, If[LessEqual[z, 1.3e-25], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+16], x, If[LessEqual[z, 1.08e+175], N[(N[(x / t), $MachinePrecision] * (-z)), $MachinePrecision], x]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+16}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.4999999999999997e38 or 1.3e-25 < z < 2.5e16 or 1.08e175 < z

    1. Initial program 68.6%

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

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

    if -8.4999999999999997e38 < z < 1.3e-25

    1. Initial program 95.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv94.4%

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

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

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

    if 2.5e16 < z < 1.08e175

    1. Initial program 75.5%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(y - z\right) \cdot \frac{x}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out85.9%

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

        \[\leadsto \color{blue}{\left(0 - \left(y - z\right)\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      7. associate--r-85.9%

        \[\leadsto \color{blue}{\left(\left(0 - y\right) + z\right)} \cdot \frac{x}{-\left(t - z\right)} \]
      8. neg-sub085.9%

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

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

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{0 - \left(t - z\right)}} \]
      12. associate--r-85.9%

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{\left(0 - t\right) + z}} \]
      13. neg-sub085.9%

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

        \[\leadsto \left(z - y\right) \cdot \frac{x}{\color{blue}{z + \left(-t\right)}} \]
      15. sub-neg85.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{x}{t}} \]
    13. Simplified42.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \frac{z}{-t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.8e+38)
   x
   (if (<= z 1.3e-25)
     (/ x (/ t y))
     (if (<= z 2.3e+16) x (if (<= z 1.08e+175) (* x (/ z (- t))) x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.8e+38) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 2.3e+16) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = x * (z / -t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.8d+38)) then
        tmp = x
    else if (z <= 1.3d-25) then
        tmp = x / (t / y)
    else if (z <= 2.3d+16) then
        tmp = x
    else if (z <= 1.08d+175) then
        tmp = x * (z / -t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.8e+38) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 2.3e+16) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = x * (z / -t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.8e+38:
		tmp = x
	elif z <= 1.3e-25:
		tmp = x / (t / y)
	elif z <= 2.3e+16:
		tmp = x
	elif z <= 1.08e+175:
		tmp = x * (z / -t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.8e+38)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = Float64(x / Float64(t / y));
	elseif (z <= 2.3e+16)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = Float64(x * Float64(z / Float64(-t)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.8e+38)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = x / (t / y);
	elseif (z <= 2.3e+16)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = x * (z / -t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.8e+38], x, If[LessEqual[z, 1.3e-25], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+16], x, If[LessEqual[z, 1.08e+175], N[(x * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+16}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8e38 or 1.3e-25 < z < 2.3e16 or 1.08e175 < z

    1. Initial program 68.6%

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

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

    if -2.8e38 < z < 1.3e-25

    1. Initial program 95.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv94.4%

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

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

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

    if 2.3e16 < z < 1.08e175

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{z}{t}\right)} \]
      4. distribute-neg-frac245.0%

        \[\leadsto x \cdot \color{blue}{\frac{z}{-t}} \]
    10. Simplified45.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \frac{z}{-t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;\frac{x}{\frac{t}{-z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -3.9e+39)
   x
   (if (<= z 1.3e-25)
     (/ x (/ t y))
     (if (<= z 8e+15) x (if (<= z 1.08e+175) (/ x (/ t (- z))) x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.9e+39) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 8e+15) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = x / (t / -z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-3.9d+39)) then
        tmp = x
    else if (z <= 1.3d-25) then
        tmp = x / (t / y)
    else if (z <= 8d+15) then
        tmp = x
    else if (z <= 1.08d+175) then
        tmp = x / (t / -z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.9e+39) {
		tmp = x;
	} else if (z <= 1.3e-25) {
		tmp = x / (t / y);
	} else if (z <= 8e+15) {
		tmp = x;
	} else if (z <= 1.08e+175) {
		tmp = x / (t / -z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -3.9e+39:
		tmp = x
	elif z <= 1.3e-25:
		tmp = x / (t / y)
	elif z <= 8e+15:
		tmp = x
	elif z <= 1.08e+175:
		tmp = x / (t / -z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -3.9e+39)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = Float64(x / Float64(t / y));
	elseif (z <= 8e+15)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = Float64(x / Float64(t / Float64(-z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -3.9e+39)
		tmp = x;
	elseif (z <= 1.3e-25)
		tmp = x / (t / y);
	elseif (z <= 8e+15)
		tmp = x;
	elseif (z <= 1.08e+175)
		tmp = x / (t / -z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.9e+39], x, If[LessEqual[z, 1.3e-25], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+15], x, If[LessEqual[z, 1.08e+175], N[(x / N[(t / (-z)), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 8 \cdot 10^{+15}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.9000000000000001e39 or 1.3e-25 < z < 8e15 or 1.08e175 < z

    1. Initial program 68.6%

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

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

    if -3.9000000000000001e39 < z < 1.3e-25

    1. Initial program 95.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv94.4%

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

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

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

    if 8e15 < z < 1.08e175

    1. Initial program 75.5%

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv99.6%

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{1}{\frac{y - z}{t - z}}}} \]
      2. inv-pow99.4%

        \[\leadsto \frac{x}{\color{blue}{{\left(\frac{y - z}{t - z}\right)}^{-1}}} \]
    8. Applied egg-rr99.4%

      \[\leadsto \frac{x}{\color{blue}{{\left(\frac{y - z}{t - z}\right)}^{-1}}} \]
    9. Step-by-step derivation
      1. unpow-199.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\frac{-1 \cdot t}{z}}} \]
      2. neg-mul-145.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;\frac{x}{\frac{t}{-z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-85} \lor \neg \left(z \leq 1.2 \cdot 10^{-25}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5000000000000001e-85 or 1.20000000000000005e-25 < z

    1. Initial program 73.0%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg49.3%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in70.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-70.7%

        \[\leadsto x \cdot \frac{\color{blue}{\left(0 - y\right) + z}}{z} \]
      7. neg-sub070.7%

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

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg70.7%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub70.7%

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

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

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

    if -2.5000000000000001e-85 < z < 1.20000000000000005e-25

    1. Initial program 95.4%

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv93.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-85} \lor \neg \left(z \leq 1.2 \cdot 10^{-25}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.9% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.80000000000000013e38 or 1.3e-25 < z

    1. Initial program 70.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg49.9%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in73.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. neg-sub073.5%

        \[\leadsto x \cdot \frac{\color{blue}{0 - \left(y - z\right)}}{z} \]
      6. associate--r-73.5%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg73.5%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub73.6%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses73.6%

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

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

    if -5.80000000000000013e38 < z < 1.3e-25

    1. Initial program 95.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+38} \lor \neg \left(z \leq 1.3 \cdot 10^{-25}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-74} \lor \neg \left(z \leq 6.5 \cdot 10^{-69}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8e-74 or 6.49999999999999951e-69 < z

    1. Initial program 74.1%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac258.8%

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

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

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

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

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

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

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

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

    if -5.8e-74 < z < 6.49999999999999951e-69

    1. Initial program 95.1%

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

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

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

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

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

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

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

Alternative 8: 74.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{-75}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.60000000000000077e-75

    1. Initial program 75.0%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac260.9%

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

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

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

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

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

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

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

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

    if -9.60000000000000077e-75 < z < 6.49999999999999951e-69

    1. Initial program 95.1%

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

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

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

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

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

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

    if 6.49999999999999951e-69 < z

    1. Initial program 73.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out73.2%

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{-\left(t - z\right)} \]
      6. distribute-rgt-neg-in73.2%

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(z + \left(-y\right)\right)}}{-\left(t - z\right)} \]
      11. sub-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      13. distribute-neg-in73.2%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{z + \left(-t\right)}} \]
      16. sub-neg73.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. div-inv72.9%

        \[\leadsto \color{blue}{\left(x \cdot \left(z - y\right)\right) \cdot \frac{1}{z - t}} \]
      2. *-commutative72.9%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 74.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-74}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8e-74

    1. Initial program 75.0%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac260.9%

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

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

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

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

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

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

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

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

    if -5.8e-74 < z < 3.89999999999999983e-66

    1. Initial program 95.1%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv93.3%

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

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

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

    if 3.89999999999999983e-66 < z

    1. Initial program 73.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out73.2%

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{-\left(t - z\right)} \]
      6. distribute-rgt-neg-in73.2%

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(z + \left(-y\right)\right)}}{-\left(t - z\right)} \]
      11. sub-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      13. distribute-neg-in73.2%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{z + \left(-t\right)}} \]
      16. sub-neg73.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. div-inv72.9%

        \[\leadsto \color{blue}{\left(x \cdot \left(z - y\right)\right) \cdot \frac{1}{z - t}} \]
      2. *-commutative72.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-74}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 74.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-74}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.6000000000000002e-74

    1. Initial program 75.0%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac260.9%

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

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

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

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

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

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

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

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

    if -3.6000000000000002e-74 < z < 5.09999999999999982e-67

    1. Initial program 95.1%

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

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

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

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

    if 5.09999999999999982e-67 < z

    1. Initial program 73.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out73.2%

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{-\left(t - z\right)} \]
      6. distribute-rgt-neg-in73.2%

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(z + \left(-y\right)\right)}}{-\left(t - z\right)} \]
      11. sub-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      13. distribute-neg-in73.2%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg73.2%

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{z + \left(-t\right)}} \]
      16. sub-neg73.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(z - y\right)}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. div-inv72.9%

        \[\leadsto \color{blue}{\left(x \cdot \left(z - y\right)\right) \cdot \frac{1}{z - t}} \]
      2. *-commutative72.9%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 61.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.30000000000000024e38 or 1.1599999999999999e-25 < z

    1. Initial program 70.2%

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

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

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

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

    if -5.30000000000000024e38 < z < 1.1599999999999999e-25

    1. Initial program 95.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 61.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.32e39 or 1.3e-25 < z

    1. Initial program 70.2%

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

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

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

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

    if -1.32e39 < z < 1.3e-25

    1. Initial program 95.9%

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{t - z}{y - z}}} \]
      2. un-div-inv94.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{+39}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.2% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (/ x (/ (- t z) (- y z)))

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