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

Percentage Accurate: 84.0% → 97.0%
Time: 11.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.0% 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 81.8%

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

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

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

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

Alternative 2: 59.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t}\\ \mathbf{if}\;z \leq -4.7 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-190}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-280}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y t))))
   (if (<= z -4.7e-29)
     x
     (if (<= z -4e-190)
       (* y (/ x t))
       (if (<= z 1.6e-280)
         (/ (* x y) t)
         (if (<= z 1.02e-91)
           t_1
           (if (<= z 7e-10) (* (/ x z) (- y)) (if (<= z 2.5e+49) t_1 x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / t);
	double tmp;
	if (z <= -4.7e-29) {
		tmp = x;
	} else if (z <= -4e-190) {
		tmp = y * (x / t);
	} else if (z <= 1.6e-280) {
		tmp = (x * y) / t;
	} else if (z <= 1.02e-91) {
		tmp = t_1;
	} else if (z <= 7e-10) {
		tmp = (x / z) * -y;
	} else if (z <= 2.5e+49) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / t)
    if (z <= (-4.7d-29)) then
        tmp = x
    else if (z <= (-4d-190)) then
        tmp = y * (x / t)
    else if (z <= 1.6d-280) then
        tmp = (x * y) / t
    else if (z <= 1.02d-91) then
        tmp = t_1
    else if (z <= 7d-10) then
        tmp = (x / z) * -y
    else if (z <= 2.5d+49) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y / t);
	double tmp;
	if (z <= -4.7e-29) {
		tmp = x;
	} else if (z <= -4e-190) {
		tmp = y * (x / t);
	} else if (z <= 1.6e-280) {
		tmp = (x * y) / t;
	} else if (z <= 1.02e-91) {
		tmp = t_1;
	} else if (z <= 7e-10) {
		tmp = (x / z) * -y;
	} else if (z <= 2.5e+49) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / t)
	tmp = 0
	if z <= -4.7e-29:
		tmp = x
	elif z <= -4e-190:
		tmp = y * (x / t)
	elif z <= 1.6e-280:
		tmp = (x * y) / t
	elif z <= 1.02e-91:
		tmp = t_1
	elif z <= 7e-10:
		tmp = (x / z) * -y
	elif z <= 2.5e+49:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / t))
	tmp = 0.0
	if (z <= -4.7e-29)
		tmp = x;
	elseif (z <= -4e-190)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= 1.6e-280)
		tmp = Float64(Float64(x * y) / t);
	elseif (z <= 1.02e-91)
		tmp = t_1;
	elseif (z <= 7e-10)
		tmp = Float64(Float64(x / z) * Float64(-y));
	elseif (z <= 2.5e+49)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / t);
	tmp = 0.0;
	if (z <= -4.7e-29)
		tmp = x;
	elseif (z <= -4e-190)
		tmp = y * (x / t);
	elseif (z <= 1.6e-280)
		tmp = (x * y) / t;
	elseif (z <= 1.02e-91)
		tmp = t_1;
	elseif (z <= 7e-10)
		tmp = (x / z) * -y;
	elseif (z <= 2.5e+49)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e-29], x, If[LessEqual[z, -4e-190], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-280], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.02e-91], t$95$1, If[LessEqual[z, 7e-10], N[(N[(x / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 2.5e+49], t$95$1, x]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.6999999999999998e-29 or 2.5000000000000002e49 < z

    1. Initial program 72.3%

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

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

    if -4.6999999999999998e-29 < z < -4.0000000000000001e-190

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified51.4%

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    8. Applied egg-rr52.7%

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

    if -4.0000000000000001e-190 < z < 1.6e-280

    1. Initial program 99.2%

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

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

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

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

    if 1.6e-280 < z < 1.01999999999999994e-91 or 6.99999999999999961e-10 < z < 2.5000000000000002e49

    1. Initial program 91.6%

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

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

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

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

    if 1.01999999999999994e-91 < z < 6.99999999999999961e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{-x}}{z} \]
    9. Simplified52.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-190}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-280}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-91}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 59.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{t}\\ \mathbf{if}\;z \leq -4.7 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-190}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-280}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y t))))
   (if (<= z -4.7e-29)
     x
     (if (<= z -7.2e-190)
       (* y (/ x t))
       (if (<= z 1.85e-280)
         (/ (* x y) t)
         (if (<= z 7.5e-91)
           t_1
           (if (<= z 5.5e-10)
             (* x (/ (- y) z))
             (if (<= z 3.5e+49) t_1 x))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / t);
	double tmp;
	if (z <= -4.7e-29) {
		tmp = x;
	} else if (z <= -7.2e-190) {
		tmp = y * (x / t);
	} else if (z <= 1.85e-280) {
		tmp = (x * y) / t;
	} else if (z <= 7.5e-91) {
		tmp = t_1;
	} else if (z <= 5.5e-10) {
		tmp = x * (-y / z);
	} else if (z <= 3.5e+49) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / t)
    if (z <= (-4.7d-29)) then
        tmp = x
    else if (z <= (-7.2d-190)) then
        tmp = y * (x / t)
    else if (z <= 1.85d-280) then
        tmp = (x * y) / t
    else if (z <= 7.5d-91) then
        tmp = t_1
    else if (z <= 5.5d-10) then
        tmp = x * (-y / z)
    else if (z <= 3.5d+49) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y / t);
	double tmp;
	if (z <= -4.7e-29) {
		tmp = x;
	} else if (z <= -7.2e-190) {
		tmp = y * (x / t);
	} else if (z <= 1.85e-280) {
		tmp = (x * y) / t;
	} else if (z <= 7.5e-91) {
		tmp = t_1;
	} else if (z <= 5.5e-10) {
		tmp = x * (-y / z);
	} else if (z <= 3.5e+49) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / t)
	tmp = 0
	if z <= -4.7e-29:
		tmp = x
	elif z <= -7.2e-190:
		tmp = y * (x / t)
	elif z <= 1.85e-280:
		tmp = (x * y) / t
	elif z <= 7.5e-91:
		tmp = t_1
	elif z <= 5.5e-10:
		tmp = x * (-y / z)
	elif z <= 3.5e+49:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / t))
	tmp = 0.0
	if (z <= -4.7e-29)
		tmp = x;
	elseif (z <= -7.2e-190)
		tmp = Float64(y * Float64(x / t));
	elseif (z <= 1.85e-280)
		tmp = Float64(Float64(x * y) / t);
	elseif (z <= 7.5e-91)
		tmp = t_1;
	elseif (z <= 5.5e-10)
		tmp = Float64(x * Float64(Float64(-y) / z));
	elseif (z <= 3.5e+49)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / t);
	tmp = 0.0;
	if (z <= -4.7e-29)
		tmp = x;
	elseif (z <= -7.2e-190)
		tmp = y * (x / t);
	elseif (z <= 1.85e-280)
		tmp = (x * y) / t;
	elseif (z <= 7.5e-91)
		tmp = t_1;
	elseif (z <= 5.5e-10)
		tmp = x * (-y / z);
	elseif (z <= 3.5e+49)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e-29], x, If[LessEqual[z, -7.2e-190], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-280], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 7.5e-91], t$95$1, If[LessEqual[z, 5.5e-10], N[(x * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+49], t$95$1, x]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.6999999999999998e-29 or 3.49999999999999975e49 < z

    1. Initial program 72.3%

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

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

    if -4.6999999999999998e-29 < z < -7.20000000000000014e-190

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified51.4%

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    8. Applied egg-rr52.7%

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

    if -7.20000000000000014e-190 < z < 1.8499999999999999e-280

    1. Initial program 99.2%

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

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

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

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

    if 1.8499999999999999e-280 < z < 7.50000000000000051e-91 or 5.4999999999999996e-10 < z < 3.49999999999999975e49

    1. Initial program 91.6%

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

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

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

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

    if 7.50000000000000051e-91 < z < 5.4999999999999996e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-190}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-280}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-91}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \frac{-y}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 75.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{-28} \lor \neg \left(y \leq 1360\right) \land \left(y \leq 1.22 \cdot 10^{+44} \lor \neg \left(y \leq 6.5 \cdot 10^{+97}\right)\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 -2.55e-28)
         (and (not (<= y 1360.0)) (or (<= y 1.22e+44) (not (<= y 6.5e+97)))))
   (* x (/ y (- t z)))
   (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -2.55e-28) || (!(y <= 1360.0) && ((y <= 1.22e+44) || !(y <= 6.5e+97)))) {
		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 <= (-2.55d-28)) .or. (.not. (y <= 1360.0d0)) .and. (y <= 1.22d+44) .or. (.not. (y <= 6.5d+97))) 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 <= -2.55e-28) || (!(y <= 1360.0) && ((y <= 1.22e+44) || !(y <= 6.5e+97)))) {
		tmp = x * (y / (t - z));
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -2.55e-28) or (not (y <= 1360.0) and ((y <= 1.22e+44) or not (y <= 6.5e+97))):
		tmp = x * (y / (t - z))
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -2.55e-28) || (!(y <= 1360.0) && ((y <= 1.22e+44) || !(y <= 6.5e+97))))
		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 <= -2.55e-28) || (~((y <= 1360.0)) && ((y <= 1.22e+44) || ~((y <= 6.5e+97)))))
		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, -2.55e-28], And[N[Not[LessEqual[y, 1360.0]], $MachinePrecision], Or[LessEqual[y, 1.22e+44], N[Not[LessEqual[y, 6.5e+97]], $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 -2.55 \cdot 10^{-28} \lor \neg \left(y \leq 1360\right) \land \left(y \leq 1.22 \cdot 10^{+44} \lor \neg \left(y \leq 6.5 \cdot 10^{+97}\right)\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 < -2.55000000000000004e-28 or 1360 < y < 1.22e44 or 6.4999999999999999e97 < y

    1. Initial program 81.6%

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

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

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

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

    if -2.55000000000000004e-28 < y < 1360 or 1.22e44 < y < 6.4999999999999999e97

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z \cdot 1}{\left(-t\right) + z}} \]
      2. *-rgt-identity83.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{-28} \lor \neg \left(y \leq 1360\right) \land \left(y \leq 1.22 \cdot 10^{+44} \lor \neg \left(y \leq 6.5 \cdot 10^{+97}\right)\right):\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]

Alternative 5: 68.3% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -2.15 \cdot 10^{-120} \lor \neg \left(z \leq 4.2 \cdot 10^{-91}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.60000000000000005e-35 or -6.60000000000000033e-70 < z < -2.14999999999999991e-120 or 4.1999999999999998e-91 < z

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000005e-35 < z < -6.60000000000000033e-70

    1. Initial program 84.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified70.0%

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

    if -2.14999999999999991e-120 < z < 4.1999999999999998e-91

    1. Initial program 94.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-35}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-70}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-120} \lor \neg \left(z \leq 4.2 \cdot 10^{-91}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \end{array} \]

Alternative 6: 75.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 4500:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+45} \lor \neg \left(y \leq 2.4 \cdot 10^{+98}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7500000000000001e-27 or 4500 < y < 2.5e45 or 2.3999999999999999e98 < y

    1. Initial program 81.6%

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

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

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

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

    if -2.7500000000000001e-27 < y < 4500

    1. Initial program 82.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub83.6%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. sub-neg83.6%

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

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

        \[\leadsto \frac{-x}{\frac{t}{z} + \color{blue}{-1}} \]
    6. Simplified83.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{1 + \left(-\frac{t}{z}\right)}} \]
      2. *-rgt-identity83.6%

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

        \[\leadsto \frac{x}{\color{blue}{1 - \frac{t}{z}}} \]
    10. Simplified83.6%

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

    if 2.5e45 < y < 2.3999999999999999e98

    1. Initial program 79.5%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\left(-\left(-z\right)\right) \cdot \frac{1}{-\left(t - z\right)}\right)} \]
      3. remove-double-neg78.9%

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z \cdot 1}{\left(-t\right) + z}} \]
      2. *-rgt-identity79.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{elif}\;y \leq 4500:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+45} \lor \neg \left(y \leq 2.4 \cdot 10^{+98}\right):\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]

Alternative 7: 75.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.08 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;y \leq 2200:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;y \leq 2.82 \cdot 10^{+45} \lor \neg \left(y \leq 3.8 \cdot 10^{+99}\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 (<= y -1.08e-26)
   (/ x (/ (- t z) y))
   (if (<= y 2200.0)
     (/ x (- 1.0 (/ t z)))
     (if (or (<= y 2.82e+45) (not (<= y 3.8e+99)))
       (* x (/ y (- t z)))
       (* x (/ z (- z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.08e-26) {
		tmp = x / ((t - z) / y);
	} else if (y <= 2200.0) {
		tmp = x / (1.0 - (t / z));
	} else if ((y <= 2.82e+45) || !(y <= 3.8e+99)) {
		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 <= (-1.08d-26)) then
        tmp = x / ((t - z) / y)
    else if (y <= 2200.0d0) then
        tmp = x / (1.0d0 - (t / z))
    else if ((y <= 2.82d+45) .or. (.not. (y <= 3.8d+99))) 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 <= -1.08e-26) {
		tmp = x / ((t - z) / y);
	} else if (y <= 2200.0) {
		tmp = x / (1.0 - (t / z));
	} else if ((y <= 2.82e+45) || !(y <= 3.8e+99)) {
		tmp = x * (y / (t - z));
	} else {
		tmp = x * (z / (z - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.08e-26:
		tmp = x / ((t - z) / y)
	elif y <= 2200.0:
		tmp = x / (1.0 - (t / z))
	elif (y <= 2.82e+45) or not (y <= 3.8e+99):
		tmp = x * (y / (t - z))
	else:
		tmp = x * (z / (z - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.08e-26)
		tmp = Float64(x / Float64(Float64(t - z) / y));
	elseif (y <= 2200.0)
		tmp = Float64(x / Float64(1.0 - Float64(t / z)));
	elseif ((y <= 2.82e+45) || !(y <= 3.8e+99))
		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 <= -1.08e-26)
		tmp = x / ((t - z) / y);
	elseif (y <= 2200.0)
		tmp = x / (1.0 - (t / z));
	elseif ((y <= 2.82e+45) || ~((y <= 3.8e+99)))
		tmp = x * (y / (t - z));
	else
		tmp = x * (z / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.08e-26], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2200.0], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.82e+45], N[Not[LessEqual[y, 3.8e+99]], $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 -1.08 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\

\mathbf{elif}\;y \leq 2200:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\

\mathbf{elif}\;y \leq 2.82 \cdot 10^{+45} \lor \neg \left(y \leq 3.8 \cdot 10^{+99}\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.07999999999999996e-26

    1. Initial program 81.1%

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

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

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

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

    if -1.07999999999999996e-26 < y < 2200

    1. Initial program 82.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x}{\frac{t - z}{z}}} \]
      4. div-sub83.6%

        \[\leadsto \frac{-x}{\color{blue}{\frac{t}{z} - \frac{z}{z}}} \]
      5. sub-neg83.6%

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

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

        \[\leadsto \frac{-x}{\frac{t}{z} + \color{blue}{-1}} \]
    6. Simplified83.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{1 + \left(-\frac{t}{z}\right)}} \]
      2. *-rgt-identity83.6%

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

        \[\leadsto \frac{x}{\color{blue}{1 - \frac{t}{z}}} \]
    10. Simplified83.6%

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

    if 2200 < y < 2.81999999999999995e45 or 3.8e99 < y

    1. Initial program 82.3%

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

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

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

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

    if 2.81999999999999995e45 < y < 3.8e99

    1. Initial program 79.5%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\left(-\left(-z\right)\right) \cdot \frac{1}{-\left(t - z\right)}\right)} \]
      3. remove-double-neg78.9%

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z \cdot 1}{\left(-t\right) + z}} \]
      2. *-rgt-identity79.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.08 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{elif}\;y \leq 2200:\\ \;\;\;\;\frac{x}{1 - \frac{t}{z}}\\ \mathbf{elif}\;y \leq 2.82 \cdot 10^{+45} \lor \neg \left(y \leq 3.8 \cdot 10^{+99}\right):\\ \;\;\;\;x \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \end{array} \]

Alternative 8: 60.6% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.39999999999999992e-29 or 3.0000000000000002e49 < z

    1. Initial program 72.3%

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

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

    if -2.39999999999999992e-29 < z < -3.2000000000000001e-190

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    6. Simplified51.4%

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    8. Applied egg-rr52.7%

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

    if -3.2000000000000001e-190 < z < 1.6599999999999999e-280

    1. Initial program 99.2%

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

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

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

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

    if 1.6599999999999999e-280 < z < 3.0000000000000002e49

    1. Initial program 91.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-190}:\\ \;\;\;\;y \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{-280}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 73.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4600000000000 \lor \neg \left(z \leq 8.2 \cdot 10^{-91}\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 -4600000000000.0) (not (<= z 8.2e-91)))
   (* x (- 1.0 (/ y z)))
   (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4600000000000.0) || !(z <= 8.2e-91)) {
		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 <= (-4600000000000.0d0)) .or. (.not. (z <= 8.2d-91))) 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 <= -4600000000000.0) || !(z <= 8.2e-91)) {
		tmp = x * (1.0 - (y / z));
	} else {
		tmp = x * (y / (t - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4600000000000.0) or not (z <= 8.2e-91):
		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 <= -4600000000000.0) || !(z <= 8.2e-91))
		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 <= -4600000000000.0) || ~((z <= 8.2e-91)))
		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, -4600000000000.0], N[Not[LessEqual[z, 8.2e-91]], $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 -4600000000000 \lor \neg \left(z \leq 8.2 \cdot 10^{-91}\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 < -4.6e12 or 8.20000000000000048e-91 < z

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

    if -4.6e12 < z < 8.20000000000000048e-91

    1. Initial program 91.7%

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

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

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

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

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

Alternative 10: 61.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.11999999999999995e-29 or 4.49999999999999982e49 < z

    1. Initial program 72.3%

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

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

    if -1.11999999999999995e-29 < z < 4.49999999999999982e49

    1. Initial program 90.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 61.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6999999999999997e-29 or 2.5000000000000002e49 < z

    1. Initial program 72.3%

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

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

    if -3.6999999999999997e-29 < z < 2.5000000000000002e49

    1. Initial program 90.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-29}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 97.1% accurate, 1.0× speedup?

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

\\
x \cdot \frac{y - z}{t - z}
\end{array}
Derivation
  1. Initial program 81.8%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification36.8%

    \[\leadsto x \]

Developer target: 97.0% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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