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

Percentage Accurate: 84.6% → 97.0%
Time: 10.5s
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.6% 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} \\ \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}
Derivation
  1. Initial program 87.1%

    \[\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 x around 0 87.1%

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

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

      \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
    3. /-rgt-identity81.8%

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

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

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

Alternative 2: 59.6% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65000000000000004e93 or 1.27999999999999994e39 < z

    1. Initial program 79.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 70.2%

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

    if -1.65000000000000004e93 < z < -1e-84

    1. Initial program 97.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity90.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1e-84 < z < 1.27999999999999994e39

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 59.6% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65000000000000004e93 or 9.4999999999999995e38 < z

    1. Initial program 79.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 70.2%

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

    if -1.65000000000000004e93 < z < -9.80000000000000029e-85

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-y}{z}} \]
    10. Simplified43.8%

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

    if -9.80000000000000029e-85 < z < 9.4999999999999995e38

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

\mathbf{elif}\;y \leq 7.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.00000000000000012e40

    1. Initial program 81.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity87.8%

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

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

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

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

    if -4.00000000000000012e40 < y < 7.3999999999999999e-16

    1. Initial program 88.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity80.5%

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{-\frac{t - z}{z}}} \]
      2. div-sub82.9%

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

        \[\leadsto \frac{x}{-\color{blue}{\left(\frac{t}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses82.9%

        \[\leadsto \frac{x}{-\left(\frac{t}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval82.9%

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

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

    if 7.3999999999999999e-16 < y

    1. Initial program 89.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+40}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{-x}{\frac{t}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+41} \lor \neg \left(y \leq 2.2 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.80000000000000013e41 or 2.2000000000000001e-21 < y

    1. Initial program 85.7%

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

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

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{\left(t - z\right) \cdot 1}} \]
      2. times-frac83.0%

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity83.0%

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

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

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

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

    if -1.80000000000000013e41 < y < 2.2000000000000001e-21

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+40} \lor \neg \left(y \leq 2.4 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.0000000000000004e40 or 2.4e-14 < y

    1. Initial program 85.7%

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

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

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

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

    if -6.0000000000000004e40 < y < 2.4e-14

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+50} \lor \neg \left(z \leq 9 \cdot 10^{+38}\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 -1.55e+50) (not (<= z 9e+38)))
   (* x (- 1.0 (/ y z)))
   (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.55e+50) || !(z <= 9e+38)) {
		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 <= (-1.55d+50)) .or. (.not. (z <= 9d+38))) 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 <= -1.55e+50) || !(z <= 9e+38)) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = x * (y / (t - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.55e+50) or not (z <= 9e+38):
		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 <= -1.55e+50) || !(z <= 9e+38))
		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 <= -1.55e+50) || ~((z <= 9e+38)))
		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, -1.55e+50], N[Not[LessEqual[z, 9e+38]], $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 -1.55 \cdot 10^{+50} \lor \neg \left(z \leq 9 \cdot 10^{+38}\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 < -1.55000000000000001e50 or 8.99999999999999961e38 < z

    1. Initial program 80.9%

      \[\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 t around 0 67.7%

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

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

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

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

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

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in84.6%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg84.6%

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

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

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

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

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

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

    if -1.55000000000000001e50 < z < 8.99999999999999961e38

    1. Initial program 91.8%

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

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

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

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

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

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

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

Alternative 8: 68.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{-86} \lor \neg \left(z \leq 3.15 \cdot 10^{+38}\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 -9.2e-86) (not (<= z 3.15e+38)))
   (* x (- 1.0 (/ y z)))
   (/ x (/ t y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -9.2e-86) || !(z <= 3.15e+38)) {
		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 <= (-9.2d-86)) .or. (.not. (z <= 3.15d+38))) 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 <= -9.2e-86) || !(z <= 3.15e+38)) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = x / (t / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -9.2e-86) or not (z <= 3.15e+38):
		tmp = x * (1.0 - (y / z))
	else:
		tmp = x / (t / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -9.2e-86) || !(z <= 3.15e+38))
		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 <= -9.2e-86) || ~((z <= 3.15e+38)))
		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, -9.2e-86], N[Not[LessEqual[z, 3.15e+38]], $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 -9.2 \cdot 10^{-86} \lor \neg \left(z \leq 3.15 \cdot 10^{+38}\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 < -9.19999999999999985e-86 or 3.15000000000000001e38 < z

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.19999999999999985e-86 < z < 3.15000000000000001e38

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 74.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.0000000000000004e40

    1. Initial program 81.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity87.8%

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

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

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

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

    if -6.0000000000000004e40 < y < 6.9999999999999997e-26

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999997e-26 < y

    1. Initial program 89.1%

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

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

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

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

Alternative 10: 60.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000034e50 or 1.95e39 < z

    1. Initial program 80.9%

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

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

    if -4.40000000000000034e50 < z < 1.95e39

    1. Initial program 91.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity91.9%

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

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

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

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

Alternative 11: 60.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55000000000000001e50 or 7.99999999999999952e39 < z

    1. Initial program 80.9%

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

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

    if -1.55000000000000001e50 < z < 7.99999999999999952e39

    1. Initial program 91.8%

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

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

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

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

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

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

Alternative 12: 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 87.1%

    \[\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. Add Preprocessing

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 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 2024145 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (/ x (/ (- t z) (- y z))))

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