Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D

Percentage Accurate: 92.7% → 97.8%
Time: 6.5s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - x\right)}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
	return x + ((y * (z - x)) / t);
}
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 - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y * (z - x)) / t);
}
def code(x, y, z, t):
	return x + ((y * (z - x)) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y * Float64(z - x)) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y * (z - x)) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 92.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - x\right)}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
	return x + ((y * (z - x)) / t);
}
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 - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y * (z - x)) / t);
}
def code(x, y, z, t):
	return x + ((y * (z - x)) / t)
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y * Float64(z - x)) / t))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y * (z - x)) / t);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{t} \cdot \left(z - x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (+ x (* (/ y t) (- z x))))
double code(double x, double y, double z, double t) {
	return x + ((y / t) * (z - 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 + ((y / t) * (z - x))
end function
public static double code(double x, double y, double z, double t) {
	return x + ((y / t) * (z - x));
}
def code(x, y, z, t):
	return x + ((y / t) * (z - x))
function code(x, y, z, t)
	return Float64(x + Float64(Float64(y / t) * Float64(z - x)))
end
function tmp = code(x, y, z, t)
	tmp = x + ((y / t) * (z - x));
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{t} \cdot \left(z - x\right)
\end{array}
Derivation
  1. Initial program 92.4%

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

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

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

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

Alternative 2: 74.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-193} \lor \neg \left(z \leq 4 \cdot 10^{-245} \lor \neg \left(z \leq 2.5 \cdot 10^{-157}\right) \land z \leq 3.6 \cdot 10^{-117}\right):\\
\;\;\;\;x + \frac{y}{t} \cdot z\\

\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.50000000000000014e-193 or 3.9999999999999997e-245 < z < 2.5000000000000001e-157 or 3.6e-117 < z

    1. Initial program 91.9%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
    6. Simplified86.2%

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

    if -5.50000000000000014e-193 < z < 3.9999999999999997e-245 or 2.5000000000000001e-157 < z < 3.6e-117

    1. Initial program 94.6%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-199.8%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt46.6%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod55.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg55.5%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod15.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt25.4%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg25.4%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg25.4%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv25.4%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative25.4%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt9.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod48.7%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg48.7%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod42.8%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt89.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg69.6%

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

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot y} \]
      3. distribute-lft-neg-out73.1%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified73.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-193} \lor \neg \left(z \leq 4 \cdot 10^{-245} \lor \neg \left(z \leq 2.5 \cdot 10^{-157}\right) \land z \leq 3.6 \cdot 10^{-117}\right):\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \end{array} \]

Alternative 3: 73.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-193}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-245} \lor \neg \left(z \leq 2.4 \cdot 10^{-157}\right) \land z \leq 3.6 \cdot 10^{-117}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -5.4e-193)
   (+ x (/ z (/ t y)))
   (if (or (<= z 4.5e-245) (and (not (<= z 2.4e-157)) (<= z 3.6e-117)))
     (* (- y) (/ x t))
     (+ x (* (/ y t) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5.4e-193) {
		tmp = x + (z / (t / y));
	} else if ((z <= 4.5e-245) || (!(z <= 2.4e-157) && (z <= 3.6e-117))) {
		tmp = -y * (x / t);
	} else {
		tmp = x + ((y / t) * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-5.4d-193)) then
        tmp = x + (z / (t / y))
    else if ((z <= 4.5d-245) .or. (.not. (z <= 2.4d-157)) .and. (z <= 3.6d-117)) then
        tmp = -y * (x / t)
    else
        tmp = x + ((y / t) * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -5.4e-193) {
		tmp = x + (z / (t / y));
	} else if ((z <= 4.5e-245) || (!(z <= 2.4e-157) && (z <= 3.6e-117))) {
		tmp = -y * (x / t);
	} else {
		tmp = x + ((y / t) * z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -5.4e-193:
		tmp = x + (z / (t / y))
	elif (z <= 4.5e-245) or (not (z <= 2.4e-157) and (z <= 3.6e-117)):
		tmp = -y * (x / t)
	else:
		tmp = x + ((y / t) * z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -5.4e-193)
		tmp = Float64(x + Float64(z / Float64(t / y)));
	elseif ((z <= 4.5e-245) || (!(z <= 2.4e-157) && (z <= 3.6e-117)))
		tmp = Float64(Float64(-y) * Float64(x / t));
	else
		tmp = Float64(x + Float64(Float64(y / t) * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -5.4e-193)
		tmp = x + (z / (t / y));
	elseif ((z <= 4.5e-245) || (~((z <= 2.4e-157)) && (z <= 3.6e-117)))
		tmp = -y * (x / t);
	else
		tmp = x + ((y / t) * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.4e-193], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.5e-245], And[N[Not[LessEqual[z, 2.4e-157]], $MachinePrecision], LessEqual[z, 3.6e-117]]], N[((-y) * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-245} \lor \neg \left(z \leq 2.4 \cdot 10^{-157}\right) \land z \leq 3.6 \cdot 10^{-117}:\\
\;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\

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


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

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Applied egg-rr84.4%

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

    if -5.3999999999999998e-193 < z < 4.49999999999999969e-245 or 2.4e-157 < z < 3.6e-117

    1. Initial program 94.6%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-199.8%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt46.6%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod55.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg55.5%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod15.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt25.4%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg25.4%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg25.4%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv25.4%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative25.4%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt9.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod48.7%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg48.7%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod42.8%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt89.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg69.6%

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

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot y} \]
      3. distribute-lft-neg-out73.1%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified73.1%

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

    if 4.49999999999999969e-245 < z < 2.4e-157 or 3.6e-117 < z

    1. Initial program 91.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
    6. Simplified87.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-193}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-245} \lor \neg \left(z \leq 2.4 \cdot 10^{-157}\right) \land z \leq 3.6 \cdot 10^{-117}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \]

Alternative 4: 73.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-y\right) \cdot \frac{x}{t}\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{-193}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y) (/ x t))))
   (if (<= z -5.4e-193)
     (+ x (/ z (/ t y)))
     (if (<= z 8e-244)
       t_1
       (if (<= z 2.5e-157)
         (+ x (/ (* y z) t))
         (if (<= z 1.22e-115) t_1 (+ x (* (/ y t) z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = -y * (x / t);
	double tmp;
	if (z <= -5.4e-193) {
		tmp = x + (z / (t / y));
	} else if (z <= 8e-244) {
		tmp = t_1;
	} else if (z <= 2.5e-157) {
		tmp = x + ((y * z) / t);
	} else if (z <= 1.22e-115) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = -y * (x / t)
    if (z <= (-5.4d-193)) then
        tmp = x + (z / (t / y))
    else if (z <= 8d-244) then
        tmp = t_1
    else if (z <= 2.5d-157) then
        tmp = x + ((y * z) / t)
    else if (z <= 1.22d-115) then
        tmp = t_1
    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 t_1 = -y * (x / t);
	double tmp;
	if (z <= -5.4e-193) {
		tmp = x + (z / (t / y));
	} else if (z <= 8e-244) {
		tmp = t_1;
	} else if (z <= 2.5e-157) {
		tmp = x + ((y * z) / t);
	} else if (z <= 1.22e-115) {
		tmp = t_1;
	} else {
		tmp = x + ((y / t) * z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -y * (x / t)
	tmp = 0
	if z <= -5.4e-193:
		tmp = x + (z / (t / y))
	elif z <= 8e-244:
		tmp = t_1
	elif z <= 2.5e-157:
		tmp = x + ((y * z) / t)
	elif z <= 1.22e-115:
		tmp = t_1
	else:
		tmp = x + ((y / t) * z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-y) * Float64(x / t))
	tmp = 0.0
	if (z <= -5.4e-193)
		tmp = Float64(x + Float64(z / Float64(t / y)));
	elseif (z <= 8e-244)
		tmp = t_1;
	elseif (z <= 2.5e-157)
		tmp = Float64(x + Float64(Float64(y * z) / t));
	elseif (z <= 1.22e-115)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y / t) * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -y * (x / t);
	tmp = 0.0;
	if (z <= -5.4e-193)
		tmp = x + (z / (t / y));
	elseif (z <= 8e-244)
		tmp = t_1;
	elseif (z <= 2.5e-157)
		tmp = x + ((y * z) / t);
	elseif (z <= 1.22e-115)
		tmp = t_1;
	else
		tmp = x + ((y / t) * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-y) * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-193], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-244], t$95$1, If[LessEqual[z, 2.5e-157], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e-115], t$95$1, N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-193}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-244}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.22 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Applied egg-rr84.4%

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

    if -5.3999999999999998e-193 < z < 7.9999999999999994e-244 or 2.5000000000000001e-157 < z < 1.22000000000000009e-115

    1. Initial program 94.6%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-199.8%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt46.6%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod55.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg55.5%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod15.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt25.4%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg25.4%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg25.4%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv25.4%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative25.4%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt9.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod48.7%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg48.7%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod42.8%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt89.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg69.6%

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

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot y} \]
      3. distribute-lft-neg-out73.1%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified73.1%

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

    if 7.9999999999999994e-244 < z < 2.5000000000000001e-157

    1. Initial program 94.0%

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

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

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

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

    if 1.22000000000000009e-115 < z

    1. Initial program 91.3%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative90.0%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
    6. Simplified90.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-193}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-244}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-157}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-115}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \]

Alternative 5: 86.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Applied egg-rr88.3%

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

    if -7.00000000000000038e-97 < z < 1e-59

    1. Initial program 93.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-191.6%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified91.6%

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt46.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod60.1%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg60.1%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod21.8%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt42.2%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg42.2%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg42.2%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv42.2%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative42.2%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt20.4%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod56.0%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg56.0%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod42.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt89.1%

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

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

    if 1e-59 < z

    1. Initial program 92.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-97}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 10^{-59}:\\ \;\;\;\;x - x \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \]

Alternative 6: 85.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Applied egg-rr88.3%

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

    if -7.0000000000000004e-98 < z < 8.50000000000000044e-60

    1. Initial program 93.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-191.6%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified91.6%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{t}\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-in89.1%

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

        \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(-\frac{y}{t}\right)} \]
      3. distribute-rgt-neg-in89.1%

        \[\leadsto x \cdot 1 + \color{blue}{\left(-x \cdot \frac{y}{t}\right)} \]
      4. unsub-neg89.1%

        \[\leadsto \color{blue}{x \cdot 1 - x \cdot \frac{y}{t}} \]
      5. *-rgt-identity89.1%

        \[\leadsto \color{blue}{x} - x \cdot \frac{y}{t} \]
      6. *-commutative89.1%

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot x} \]
      7. associate-/r/91.6%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{x}}} \]
    9. Simplified91.6%

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

    if 8.50000000000000044e-60 < z

    1. Initial program 92.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative93.1%

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

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

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

Alternative 7: 85.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    8. Applied egg-rr88.3%

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

    if -5.49999999999999948e-97 < z < 1.8e-60

    1. Initial program 93.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-191.6%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified91.6%

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

        \[\leadsto x + \color{blue}{\frac{-y}{-\frac{-t}{x}}} \]
      2. div-inv91.6%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \frac{1}{-\frac{-t}{x}}} \]
      3. distribute-frac-neg91.6%

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

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

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\frac{x}{t}} \]
    8. Applied egg-rr92.4%

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

    if 1.8e-60 < z

    1. Initial program 92.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-97}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-60}:\\ \;\;\;\;x - y \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot z\\ \end{array} \]

Alternative 8: 49.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+19}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.6e19 or 4.6999999999999999e83 < t

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

    if -5.6e19 < t < 4.6999999999999999e83

    1. Initial program 98.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-157.8%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified57.8%

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt32.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod35.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg35.9%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod7.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt16.5%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg16.5%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg16.5%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv16.5%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative16.5%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt8.6%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod31.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg31.5%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod26.0%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt58.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.0%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{t}} \]
      3. distribute-rgt-neg-in46.2%

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

        \[\leadsto x \cdot \color{blue}{\frac{-y}{t}} \]
    11. Simplified46.2%

      \[\leadsto \color{blue}{x \cdot \frac{-y}{t}} \]
    12. Step-by-step derivation
      1. distribute-frac-neg46.2%

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

        \[\leadsto \color{blue}{-x \cdot \frac{y}{t}} \]
      3. add-sqr-sqrt28.4%

        \[\leadsto -x \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{t} \]
      4. sqrt-unprod29.5%

        \[\leadsto -x \cdot \frac{\color{blue}{\sqrt{y \cdot y}}}{t} \]
      5. sqr-neg29.5%

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

        \[\leadsto -x \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{t} \]
      7. add-sqr-sqrt6.6%

        \[\leadsto -x \cdot \frac{\color{blue}{-y}}{t} \]
      8. clear-num6.6%

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{t}{-y}}} \]
      10. add-sqr-sqrt2.9%

        \[\leadsto -\frac{x}{\frac{t}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}} \]
      11. sqrt-unprod30.1%

        \[\leadsto -\frac{x}{\frac{t}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}} \]
      12. sqr-neg30.1%

        \[\leadsto -\frac{x}{\frac{t}{\sqrt{\color{blue}{y \cdot y}}}} \]
      13. sqrt-unprod29.6%

        \[\leadsto -\frac{x}{\frac{t}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}} \]
      14. add-sqr-sqrt46.8%

        \[\leadsto -\frac{x}{\frac{t}{\color{blue}{y}}} \]
    13. Applied egg-rr46.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+19}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+83}:\\ \;\;\;\;\frac{-x}{\frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 48.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+18}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.6e18 or 4.3e83 < t

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

    if -4.6e18 < t < 4.3e83

    1. Initial program 98.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-157.8%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified57.8%

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt32.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod35.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg35.9%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod7.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt16.5%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg16.5%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg16.5%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv16.5%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative16.5%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt8.6%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod31.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg31.5%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod26.0%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt58.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.0%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{t}} \]
      3. distribute-rgt-neg-in46.2%

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

        \[\leadsto x \cdot \color{blue}{\frac{-y}{t}} \]
    11. Simplified46.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    13. Step-by-step derivation
      1. mul-1-neg48.0%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{t}} \]
      2. *-commutative48.0%

        \[\leadsto -\frac{\color{blue}{y \cdot x}}{t} \]
      3. associate-*l/46.2%

        \[\leadsto -\color{blue}{\frac{y}{t} \cdot x} \]
      4. associate-/r/47.8%

        \[\leadsto -\color{blue}{\frac{y}{\frac{t}{x}}} \]
    14. Simplified47.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+83}:\\ \;\;\;\;\frac{-y}{\frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 48.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{+21}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.16e21 or 4.3e83 < t

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

    if -1.16e21 < t < 4.3e83

    1. Initial program 98.5%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot t}{x}}} \]
      2. neg-mul-157.8%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-t}}{x}} \]
    6. Simplified57.8%

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

        \[\leadsto x + \color{blue}{\frac{y}{-t} \cdot x} \]
      2. add-sqr-sqrt32.5%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot x \]
      3. sqrt-unprod35.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot x \]
      4. sqr-neg35.9%

        \[\leadsto x + \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \cdot x \]
      5. sqrt-unprod7.9%

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot x \]
      6. add-sqr-sqrt16.5%

        \[\leadsto x + \frac{y}{\color{blue}{t}} \cdot x \]
      7. frac-2neg16.5%

        \[\leadsto x + \color{blue}{\frac{-y}{-t}} \cdot x \]
      8. distribute-frac-neg16.5%

        \[\leadsto x + \color{blue}{\left(-\frac{y}{-t}\right)} \cdot x \]
      9. cancel-sign-sub-inv16.5%

        \[\leadsto \color{blue}{x - \frac{y}{-t} \cdot x} \]
      10. *-commutative16.5%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-t}} \]
      11. add-sqr-sqrt8.6%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \]
      12. sqrt-unprod31.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \]
      13. sqr-neg31.5%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{t \cdot t}}} \]
      14. sqrt-unprod26.0%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \]
      15. add-sqr-sqrt58.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.0%

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

        \[\leadsto -\color{blue}{\frac{x}{t} \cdot y} \]
      3. distribute-lft-neg-out48.5%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified48.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+83}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 38.8% 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 92.4%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
    2. *-commutative74.5%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
  6. Simplified74.5%

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

    \[\leadsto \color{blue}{x} \]
  8. Final simplification37.4%

    \[\leadsto x \]

Developer target: 91.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
double code(double x, double y, double z, double t) {
	return x - ((x * (y / t)) + (-z * (y / t)));
}
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 - ((x * (y / t)) + (-z * (y / t)))
end function
public static double code(double x, double y, double z, double t) {
	return x - ((x * (y / t)) + (-z * (y / t)));
}
def code(x, y, z, t):
	return x - ((x * (y / t)) + (-z * (y / t)))
function code(x, y, z, t)
	return Float64(x - Float64(Float64(x * Float64(y / t)) + Float64(Float64(-z) * Float64(y / t))))
end
function tmp = code(x, y, z, t)
	tmp = x - ((x * (y / t)) + (-z * (y / t)));
end
code[x_, y_, z_, t_] := N[(x - N[(N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Reproduce

?
herbie shell --seed 2023290 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

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

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