Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H

Percentage Accurate: 95.7% → 97.7%
Time: 13.7s
Alternatives: 16
Speedup: 0.7×

Specification

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

\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\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 16 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: 95.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{y} - y\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{-97}:\\ \;\;\;\;x + \frac{t\_1}{z \cdot 3}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.3333333333333333 \cdot t\_1}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (/ t y) y)))
   (if (<= y -1.75e-97)
     (+ x (/ t_1 (* z 3.0)))
     (if (<= y 1.9e-219)
       (+ x (/ (/ t (* z 3.0)) y))
       (+ x (/ (* 0.3333333333333333 t_1) z))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / y) - y;
	double tmp;
	if (y <= -1.75e-97) {
		tmp = x + (t_1 / (z * 3.0));
	} else if (y <= 1.9e-219) {
		tmp = x + ((t / (z * 3.0)) / y);
	} else {
		tmp = x + ((0.3333333333333333 * t_1) / 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 = (t / y) - y
    if (y <= (-1.75d-97)) then
        tmp = x + (t_1 / (z * 3.0d0))
    else if (y <= 1.9d-219) then
        tmp = x + ((t / (z * 3.0d0)) / y)
    else
        tmp = x + ((0.3333333333333333d0 * t_1) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / y) - y;
	double tmp;
	if (y <= -1.75e-97) {
		tmp = x + (t_1 / (z * 3.0));
	} else if (y <= 1.9e-219) {
		tmp = x + ((t / (z * 3.0)) / y);
	} else {
		tmp = x + ((0.3333333333333333 * t_1) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / y) - y
	tmp = 0
	if y <= -1.75e-97:
		tmp = x + (t_1 / (z * 3.0))
	elif y <= 1.9e-219:
		tmp = x + ((t / (z * 3.0)) / y)
	else:
		tmp = x + ((0.3333333333333333 * t_1) / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / y) - y)
	tmp = 0.0
	if (y <= -1.75e-97)
		tmp = Float64(x + Float64(t_1 / Float64(z * 3.0)));
	elseif (y <= 1.9e-219)
		tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y));
	else
		tmp = Float64(x + Float64(Float64(0.3333333333333333 * t_1) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / y) - y;
	tmp = 0.0;
	if (y <= -1.75e-97)
		tmp = x + (t_1 / (z * 3.0));
	elseif (y <= 1.9e-219)
		tmp = x + ((t / (z * 3.0)) / y);
	else
		tmp = x + ((0.3333333333333333 * t_1) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -1.75e-97], N[(x + N[(t$95$1 / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-219], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{-97}:\\
\;\;\;\;x + \frac{t\_1}{z \cdot 3}\\

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

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


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

    1. Initial program 95.8%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. metadata-eval98.6%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1 \cdot \left(\frac{t}{y} - y\right)}{z \cdot 3}} \]
      5. *-un-lft-identity98.7%

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

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

    if -1.7500000000000001e-97 < y < 1.90000000000000012e-219

    1. Initial program 79.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified86.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 79.7%

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + x \]
      3. associate-*r/86.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} + x \]
      4. associate-*l/86.1%

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

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + x \]
      6. associate-*l/99.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{\frac{z}{0.3333333333333333}}}}{y} + x \]
      3. div-inv99.6%

        \[\leadsto \frac{\frac{t}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}}}{y} + x \]
      4. metadata-eval99.6%

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

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

    if 1.90000000000000012e-219 < y

    1. Initial program 96.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified98.8%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/98.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}} \]
    5. Applied egg-rr98.9%

      \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{-97}:\\ \;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.9 \cdot 10^{+102}:\\ \;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{t}{z}}{y \cdot 3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 1.9e+102)
   (+ x (fma -0.3333333333333333 (/ y z) (/ (/ t z) (* y 3.0))))
   (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.9e+102) {
		tmp = x + fma(-0.3333333333333333, (y / z), ((t / z) / (y * 3.0)));
	} else {
		tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 1.9e+102)
		tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(Float64(t / z) / Float64(y * 3.0))));
	else
		tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0))));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.9e+102], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{+102}:\\
\;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{t}{z}}{y \cdot 3}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.89999999999999989e102

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/91.4%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in91.4%

        \[\leadsto x - \color{blue}{\left(--1\right) \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)} \]
      15. metadata-eval91.4%

        \[\leadsto x - \color{blue}{1} \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right) \]
      16. *-lft-identity91.4%

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative91.3%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*91.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative91.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*98.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv98.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr98.9%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Step-by-step derivation
      1. un-div-inv98.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    8. Applied egg-rr98.9%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]

    if 1.89999999999999989e102 < t

    1. Initial program 97.5%

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

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

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

      \[\leadsto \color{blue}{\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.9 \cdot 10^{+102}:\\ \;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{t}{z}}{y \cdot 3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-99} \lor \neg \left(y \leq 5.6 \cdot 10^{-219}\right):\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.2000000000000001e-99 or 5.5999999999999998e-219 < y

    1. Initial program 96.3%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified98.7%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 98.7%

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

    if -5.2000000000000001e-99 < y < 5.5999999999999998e-219

    1. Initial program 79.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified86.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 79.7%

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + x \]
      3. associate-*r/86.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} + x \]
      4. associate-*l/86.1%

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

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + x \]
      6. associate-*l/99.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{\frac{z}{0.3333333333333333}}}}{y} + x \]
      3. div-inv99.6%

        \[\leadsto \frac{\frac{t}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}}}{y} + x \]
      4. metadata-eval99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{-99} \lor \neg \left(y \leq 5.6 \cdot 10^{-219}\right):\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-98} \lor \neg \left(y \leq 8.5 \cdot 10^{-220}\right):\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.2e-98 or 8.4999999999999996e-220 < y

    1. Initial program 96.3%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified98.7%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/98.8%

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

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

    if -6.2e-98 < y < 8.4999999999999996e-220

    1. Initial program 79.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified86.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 79.7%

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + x \]
      3. associate-*r/86.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} + x \]
      4. associate-*l/86.1%

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

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + x \]
      6. associate-*l/99.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{\frac{z}{0.3333333333333333}}}}{y} + x \]
      3. div-inv99.6%

        \[\leadsto \frac{\frac{t}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}}}{y} + x \]
      4. metadata-eval99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-98} \lor \neg \left(y \leq 8.5 \cdot 10^{-220}\right):\\ \;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 97.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -3 \cdot 10^{-99}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t\_1}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.00000000000000006e-99

    1. Initial program 95.8%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around 0 98.7%

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

    if -3.00000000000000006e-99 < y < 5.79999999999999968e-219

    1. Initial program 79.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified86.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 79.7%

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

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + x \]
      3. associate-*r/86.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} + x \]
      4. associate-*l/86.1%

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

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + x \]
      6. associate-*l/99.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t}{\frac{z}{0.3333333333333333}}}}{y} + x \]
      3. div-inv99.6%

        \[\leadsto \frac{\frac{t}{\color{blue}{z \cdot \frac{1}{0.3333333333333333}}}}{y} + x \]
      4. metadata-eval99.6%

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

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

    if 5.79999999999999968e-219 < y

    1. Initial program 96.7%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified98.8%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification99.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-99}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 96.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{-222}:\\
\;\;\;\;x + \left(y \cdot \frac{-0.3333333333333333}{z} + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.39999999999999993e-222

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/89.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative89.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*90.0%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative90.0%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*98.5%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv98.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr98.4%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Step-by-step derivation
      1. un-div-inv98.5%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    8. Applied egg-rr98.5%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    9. Step-by-step derivation
      1. fma-udef98.5%

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z} + \frac{\frac{t}{z}}{y \cdot 3}\right)} \]
      2. metadata-eval98.5%

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

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

        \[\leadsto x + \left(\frac{\color{blue}{y \cdot -0.3333333333333333}}{1 \cdot z} + \frac{\frac{t}{z}}{y \cdot 3}\right) \]
      5. *-un-lft-identity98.5%

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

        \[\leadsto x + \left(\color{blue}{y \cdot \frac{-0.3333333333333333}{z}} + \frac{\frac{t}{z}}{y \cdot 3}\right) \]
      7. *-un-lft-identity98.4%

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

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

        \[\leadsto x + \left(y \cdot \frac{-0.3333333333333333}{z} + \color{blue}{\frac{1}{3} \cdot \frac{\frac{t}{z}}{y}}\right) \]
      10. metadata-eval98.4%

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

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

    if 2.39999999999999993e-222 < y

    1. Initial program 95.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified98.8%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/98.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}} \]
    5. Applied egg-rr98.9%

      \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.6%

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

Alternative 7: 98.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.1 \cdot 10^{-55}:\\
\;\;\;\;x + \left(y \cdot \frac{-0.3333333333333333}{z} + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.09999999999999997e-55

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/90.4%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in90.4%

        \[\leadsto x - \color{blue}{\left(--1\right) \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)} \]
      15. metadata-eval90.4%

        \[\leadsto x - \color{blue}{1} \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right) \]
      16. *-lft-identity90.4%

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative90.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*90.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative90.4%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*98.8%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv98.8%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr98.8%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Step-by-step derivation
      1. un-div-inv98.8%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    8. Applied egg-rr98.8%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    9. Step-by-step derivation
      1. fma-udef98.8%

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

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

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

        \[\leadsto x + \left(\frac{\color{blue}{y \cdot -0.3333333333333333}}{1 \cdot z} + \frac{\frac{t}{z}}{y \cdot 3}\right) \]
      5. *-un-lft-identity98.8%

        \[\leadsto x + \left(\frac{y \cdot -0.3333333333333333}{\color{blue}{z}} + \frac{\frac{t}{z}}{y \cdot 3}\right) \]
      6. associate-*r/98.8%

        \[\leadsto x + \left(\color{blue}{y \cdot \frac{-0.3333333333333333}{z}} + \frac{\frac{t}{z}}{y \cdot 3}\right) \]
      7. *-un-lft-identity98.8%

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

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

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

        \[\leadsto x + \left(y \cdot \frac{-0.3333333333333333}{z} + \color{blue}{0.3333333333333333} \cdot \frac{\frac{t}{z}}{y}\right) \]
    10. Applied egg-rr98.7%

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

    if 3.09999999999999997e-55 < t

    1. Initial program 98.2%

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

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

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

      \[\leadsto \color{blue}{\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.1 \cdot 10^{-55}:\\ \;\;\;\;x + \left(y \cdot \frac{-0.3333333333333333}{z} + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 89.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -900000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 120000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -900000000000.0)
   (+ x (/ (* -0.3333333333333333 y) z))
   (if (<= y 120000.0)
     (+ x (* 0.3333333333333333 (/ t (* y z))))
     (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -900000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 120000.0) {
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	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 <= (-900000000000.0d0)) then
        tmp = x + (((-0.3333333333333333d0) * y) / z)
    else if (y <= 120000.0d0) then
        tmp = x + (0.3333333333333333d0 * (t / (y * z)))
    else
        tmp = x + (y / (z * (-3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -900000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 120000.0) {
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -900000000000.0:
		tmp = x + ((-0.3333333333333333 * y) / z)
	elif y <= 120000.0:
		tmp = x + (0.3333333333333333 * (t / (y * z)))
	else:
		tmp = x + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -900000000000.0)
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z));
	elseif (y <= 120000.0)
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z))));
	else
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -900000000000.0)
		tmp = x + ((-0.3333333333333333 * y) / z);
	elseif (y <= 120000.0)
		tmp = x + (0.3333333333333333 * (t / (y * z)));
	else
		tmp = x + (y / (z * -3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -900000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 120000.0], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -900000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 120000:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

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


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

    1. Initial program 97.1%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 92.7%

      \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. +-commutative92.7%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + x} \]
    6. Simplified92.7%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
    8. Applied egg-rr92.8%

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

    if -9e11 < y < 1.2e5

    1. Initial program 86.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified92.1%

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

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

    if 1.2e5 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/99.8%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in99.8%

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr90.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Taylor expanded in y around inf 92.8%

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    9. Simplified92.8%

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    10. Taylor expanded in z around 0 92.8%

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{-1}} \cdot \frac{y}{z} \]
      2. times-frac92.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot y}{-1 \cdot z}} \]
      3. *-commutative92.9%

        \[\leadsto x + \frac{\color{blue}{y \cdot 0.3333333333333333}}{-1 \cdot z} \]
      4. neg-mul-192.9%

        \[\leadsto x + \frac{y \cdot 0.3333333333333333}{\color{blue}{-z}} \]
      5. /-rgt-identity92.9%

        \[\leadsto x + \frac{\color{blue}{\frac{y \cdot 0.3333333333333333}{1}}}{-z} \]
      6. associate-/l*93.0%

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{1}{0.3333333333333333}}}}{-z} \]
      7. metadata-eval93.0%

        \[\leadsto x + \frac{\frac{y}{\color{blue}{3}}}{-z} \]
      8. associate-/l/92.9%

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

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

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

        \[\leadsto x + \frac{y}{z \cdot \color{blue}{-3}} \]
    12. Simplified92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -900000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 120000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -650000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 75000:\\ \;\;\;\;x + \frac{t}{z \cdot \left(y \cdot 3\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -650000000000.0)
   (+ x (/ (* -0.3333333333333333 y) z))
   (if (<= y 75000.0) (+ x (/ t (* z (* y 3.0)))) (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -650000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 75000.0) {
		tmp = x + (t / (z * (y * 3.0)));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	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 <= (-650000000000.0d0)) then
        tmp = x + (((-0.3333333333333333d0) * y) / z)
    else if (y <= 75000.0d0) then
        tmp = x + (t / (z * (y * 3.0d0)))
    else
        tmp = x + (y / (z * (-3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -650000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 75000.0) {
		tmp = x + (t / (z * (y * 3.0)));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -650000000000.0:
		tmp = x + ((-0.3333333333333333 * y) / z)
	elif y <= 75000.0:
		tmp = x + (t / (z * (y * 3.0)))
	else:
		tmp = x + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -650000000000.0)
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z));
	elseif (y <= 75000.0)
		tmp = Float64(x + Float64(t / Float64(z * Float64(y * 3.0))));
	else
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -650000000000.0)
		tmp = x + ((-0.3333333333333333 * y) / z);
	elseif (y <= 75000.0)
		tmp = x + (t / (z * (y * 3.0)));
	else
		tmp = x + (y / (z * -3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -650000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 75000.0], N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -650000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 75000:\\
\;\;\;\;x + \frac{t}{z \cdot \left(y \cdot 3\right)}\\

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


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

    1. Initial program 97.1%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 92.7%

      \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. +-commutative92.7%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + x} \]
    6. Simplified92.7%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
    8. Applied egg-rr92.8%

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

    if -6.5e11 < y < 75000

    1. Initial program 86.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. associate-/l/94.1%

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

        \[\leadsto x + \frac{\color{blue}{\frac{0.3333333333333333}{z} \cdot t}}{y} \]
      4. associate-*l/82.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{y \cdot z}{0.3333333333333333}}} \]
      3. div-inv82.8%

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

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

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

      \[\leadsto x + \color{blue}{\frac{t}{\left(z \cdot y\right) \cdot 3}} \]
    10. Taylor expanded in z around 0 82.8%

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

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

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

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

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

    if 75000 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/99.8%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in99.8%

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr90.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Taylor expanded in y around inf 92.8%

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    9. Simplified92.8%

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    10. Taylor expanded in z around 0 92.8%

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{-1}} \cdot \frac{y}{z} \]
      2. times-frac92.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot y}{-1 \cdot z}} \]
      3. *-commutative92.9%

        \[\leadsto x + \frac{\color{blue}{y \cdot 0.3333333333333333}}{-1 \cdot z} \]
      4. neg-mul-192.9%

        \[\leadsto x + \frac{y \cdot 0.3333333333333333}{\color{blue}{-z}} \]
      5. /-rgt-identity92.9%

        \[\leadsto x + \frac{\color{blue}{\frac{y \cdot 0.3333333333333333}{1}}}{-z} \]
      6. associate-/l*93.0%

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{1}{0.3333333333333333}}}}{-z} \]
      7. metadata-eval93.0%

        \[\leadsto x + \frac{\frac{y}{\color{blue}{3}}}{-z} \]
      8. associate-/l/92.9%

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

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

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

        \[\leadsto x + \frac{y}{z \cdot \color{blue}{-3}} \]
    12. Simplified92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -650000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 75000:\\ \;\;\;\;x + \frac{t}{z \cdot \left(y \cdot 3\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 89.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -220000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 720000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -220000000000.0)
   (+ x (/ (* -0.3333333333333333 y) z))
   (if (<= y 720000.0)
     (+ x (* 0.3333333333333333 (/ (/ t y) z)))
     (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -220000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 720000.0) {
		tmp = x + (0.3333333333333333 * ((t / y) / z));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	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 <= (-220000000000.0d0)) then
        tmp = x + (((-0.3333333333333333d0) * y) / z)
    else if (y <= 720000.0d0) then
        tmp = x + (0.3333333333333333d0 * ((t / y) / z))
    else
        tmp = x + (y / (z * (-3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -220000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 720000.0) {
		tmp = x + (0.3333333333333333 * ((t / y) / z));
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -220000000000.0:
		tmp = x + ((-0.3333333333333333 * y) / z)
	elif y <= 720000.0:
		tmp = x + (0.3333333333333333 * ((t / y) / z))
	else:
		tmp = x + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -220000000000.0)
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z));
	elseif (y <= 720000.0)
		tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / y) / z)));
	else
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -220000000000.0)
		tmp = x + ((-0.3333333333333333 * y) / z);
	elseif (y <= 720000.0)
		tmp = x + (0.3333333333333333 * ((t / y) / z));
	else
		tmp = x + (y / (z * -3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -220000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 720000.0], N[(x + N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -220000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 720000:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\

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


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

    1. Initial program 97.1%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 92.7%

      \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. +-commutative92.7%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + x} \]
    6. Simplified92.7%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
    8. Applied egg-rr92.8%

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

    if -2.2e11 < y < 7.2e5

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/86.8%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in86.8%

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative86.8%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*86.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative86.9%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*99.1%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv99.0%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr99.0%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Taylor expanded in y around 0 82.8%

      \[\leadsto \color{blue}{x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    8. Step-by-step derivation
      1. +-commutative82.8%

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

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

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

    if 7.2e5 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/99.8%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in99.8%

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr90.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Taylor expanded in y around inf 92.8%

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    9. Simplified92.8%

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    10. Taylor expanded in z around 0 92.8%

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{-1}} \cdot \frac{y}{z} \]
      2. times-frac92.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot y}{-1 \cdot z}} \]
      3. *-commutative92.9%

        \[\leadsto x + \frac{\color{blue}{y \cdot 0.3333333333333333}}{-1 \cdot z} \]
      4. neg-mul-192.9%

        \[\leadsto x + \frac{y \cdot 0.3333333333333333}{\color{blue}{-z}} \]
      5. /-rgt-identity92.9%

        \[\leadsto x + \frac{\color{blue}{\frac{y \cdot 0.3333333333333333}{1}}}{-z} \]
      6. associate-/l*93.0%

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{1}{0.3333333333333333}}}}{-z} \]
      7. metadata-eval93.0%

        \[\leadsto x + \frac{\frac{y}{\color{blue}{3}}}{-z} \]
      8. associate-/l/92.9%

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

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

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

        \[\leadsto x + \frac{y}{z \cdot \color{blue}{-3}} \]
    12. Simplified92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -220000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 720000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 92.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1800000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 5000:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1800000000000.0)
   (+ x (/ (* -0.3333333333333333 y) z))
   (if (<= y 5000.0)
     (+ x (/ (* t (/ 0.3333333333333333 z)) y))
     (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1800000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 5000.0) {
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	} else {
		tmp = x + (y / (z * -3.0));
	}
	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 <= (-1800000000000.0d0)) then
        tmp = x + (((-0.3333333333333333d0) * y) / z)
    else if (y <= 5000.0d0) then
        tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
    else
        tmp = x + (y / (z * (-3.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1800000000000.0) {
		tmp = x + ((-0.3333333333333333 * y) / z);
	} else if (y <= 5000.0) {
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	} else {
		tmp = x + (y / (z * -3.0));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1800000000000.0:
		tmp = x + ((-0.3333333333333333 * y) / z)
	elif y <= 5000.0:
		tmp = x + ((t * (0.3333333333333333 / z)) / y)
	else:
		tmp = x + (y / (z * -3.0))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1800000000000.0)
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z));
	elseif (y <= 5000.0)
		tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y));
	else
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1800000000000.0)
		tmp = x + ((-0.3333333333333333 * y) / z);
	elseif (y <= 5000.0)
		tmp = x + ((t * (0.3333333333333333 / z)) / y);
	else
		tmp = x + (y / (z * -3.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1800000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5000.0], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1800000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\

\mathbf{elif}\;y \leq 5000:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\

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


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

    1. Initial program 97.1%

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

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 92.7%

      \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y}{z}} \]
    5. Step-by-step derivation
      1. +-commutative92.7%

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + x} \]
    6. Simplified92.7%

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
    8. Applied egg-rr92.8%

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

    if -1.8e12 < y < 5e3

    1. Initial program 86.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Simplified92.1%

      \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 82.8%

      \[\leadsto \color{blue}{x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}} \]
    5. Step-by-step derivation
      1. +-commutative82.8%

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

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y}}{z}} + x \]
      3. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}} + x \]
      4. associate-*l/87.4%

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

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + x \]
      6. associate-*l/94.2%

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

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

    if 5e3 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
      10. associate-*r/99.8%

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

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

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

        \[\leadsto x - \left(-\color{blue}{-1 \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right)}\right) \]
      14. distribute-lft-neg-in99.8%

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
      2. associate-*l*99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
      3. *-commutative99.7%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
      4. associate-/r*90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
      5. div-inv90.6%

        \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    6. Applied egg-rr90.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
    7. Taylor expanded in y around inf 92.8%

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    9. Simplified92.8%

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
    10. Taylor expanded in z around 0 92.8%

      \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{-1}} \cdot \frac{y}{z} \]
      2. times-frac92.9%

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot y}{-1 \cdot z}} \]
      3. *-commutative92.9%

        \[\leadsto x + \frac{\color{blue}{y \cdot 0.3333333333333333}}{-1 \cdot z} \]
      4. neg-mul-192.9%

        \[\leadsto x + \frac{y \cdot 0.3333333333333333}{\color{blue}{-z}} \]
      5. /-rgt-identity92.9%

        \[\leadsto x + \frac{\color{blue}{\frac{y \cdot 0.3333333333333333}{1}}}{-z} \]
      6. associate-/l*93.0%

        \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{1}{0.3333333333333333}}}}{-z} \]
      7. metadata-eval93.0%

        \[\leadsto x + \frac{\frac{y}{\color{blue}{3}}}{-z} \]
      8. associate-/l/92.9%

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

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

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

        \[\leadsto x + \frac{y}{z \cdot \color{blue}{-3}} \]
    12. Simplified92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1800000000000:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \mathbf{elif}\;y \leq 5000:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.6% accurate, 2.1× speedup?

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

\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Derivation
  1. Initial program 92.3%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Simplified95.7%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 58.9%

    \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  5. Step-by-step derivation
    1. metadata-eval58.9%

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

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

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

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

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

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

      \[\leadsto x + y \cdot \color{blue}{\frac{-0.3333333333333333}{z}} \]
    8. metadata-eval58.8%

      \[\leadsto x + y \cdot \frac{\color{blue}{-0.3333333333333333}}{z} \]
  6. Simplified58.8%

    \[\leadsto x + \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
  7. Final simplification58.8%

    \[\leadsto x + y \cdot \frac{-0.3333333333333333}{z} \]
  8. Add Preprocessing

Alternative 13: 64.6% accurate, 2.1× speedup?

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

\\
x + \frac{-0.3333333333333333}{\frac{z}{y}}
\end{array}
Derivation
  1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
    10. associate-*r/92.3%

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

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

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

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

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

      \[\leadsto x - \color{blue}{1} \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right) \]
    16. *-lft-identity92.3%

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

    \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
    2. associate-*l*92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
    3. *-commutative92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
    4. associate-/r*96.7%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    5. div-inv96.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
  6. Applied egg-rr96.6%

    \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
  7. Taylor expanded in y around inf 58.9%

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

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

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  9. Simplified58.9%

    \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  10. Final simplification58.9%

    \[\leadsto x + \frac{-0.3333333333333333}{\frac{z}{y}} \]
  11. Add Preprocessing

Alternative 14: 64.6% accurate, 2.1× speedup?

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

\\
x + \frac{y}{z \cdot -3}
\end{array}
Derivation
  1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \left(-\left(\left(-\frac{y}{z \cdot 3}\right) + \frac{-1 \cdot t}{\color{blue}{\left(z \cdot 3\right) \cdot \left(-y\right)}}\right)\right) \]
    10. associate-*r/92.3%

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

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

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

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

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

      \[\leadsto x - \color{blue}{1} \cdot \left(\frac{y}{z \cdot 3} + \frac{t}{\left(z \cdot 3\right) \cdot \left(-y\right)}\right) \]
    16. *-lft-identity92.3%

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

    \[\leadsto \color{blue}{x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{y \cdot \left(z \cdot 3\right)}\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{\left(z \cdot 3\right) \cdot y}}\right) \]
    2. associate-*l*92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{\color{blue}{z \cdot \left(3 \cdot y\right)}}\right) \]
    3. *-commutative92.3%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z \cdot \color{blue}{\left(y \cdot 3\right)}}\right) \]
    4. associate-/r*96.7%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{\frac{t}{z}}{y \cdot 3}}\right) \]
    5. div-inv96.6%

      \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
  6. Applied egg-rr96.6%

    \[\leadsto x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \color{blue}{\frac{t}{z} \cdot \frac{1}{y \cdot 3}}\right) \]
  7. Taylor expanded in y around inf 58.9%

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

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

      \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  9. Simplified58.9%

    \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{\frac{z}{y}}} \]
  10. Taylor expanded in z around 0 58.9%

    \[\leadsto x + \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
  11. Step-by-step derivation
    1. metadata-eval58.9%

      \[\leadsto x + \color{blue}{\frac{0.3333333333333333}{-1}} \cdot \frac{y}{z} \]
    2. times-frac58.9%

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

      \[\leadsto x + \frac{\color{blue}{y \cdot 0.3333333333333333}}{-1 \cdot z} \]
    4. neg-mul-158.9%

      \[\leadsto x + \frac{y \cdot 0.3333333333333333}{\color{blue}{-z}} \]
    5. /-rgt-identity58.9%

      \[\leadsto x + \frac{\color{blue}{\frac{y \cdot 0.3333333333333333}{1}}}{-z} \]
    6. associate-/l*58.9%

      \[\leadsto x + \frac{\color{blue}{\frac{y}{\frac{1}{0.3333333333333333}}}}{-z} \]
    7. metadata-eval58.9%

      \[\leadsto x + \frac{\frac{y}{\color{blue}{3}}}{-z} \]
    8. associate-/l/58.9%

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

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

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

      \[\leadsto x + \frac{y}{z \cdot \color{blue}{-3}} \]
  12. Simplified58.9%

    \[\leadsto x + \color{blue}{\frac{y}{z \cdot -3}} \]
  13. Final simplification58.9%

    \[\leadsto x + \frac{y}{z \cdot -3} \]
  14. Add Preprocessing

Alternative 15: 64.6% accurate, 2.1× speedup?

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

\\
x + \frac{-0.3333333333333333 \cdot y}{z}
\end{array}
Derivation
  1. Initial program 92.3%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Simplified95.7%

    \[\leadsto \color{blue}{x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 58.9%

    \[\leadsto \color{blue}{x + -0.3333333333333333 \cdot \frac{y}{z}} \]
  5. Step-by-step derivation
    1. +-commutative58.9%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z} + x} \]
  6. Simplified58.9%

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
  8. Applied egg-rr58.9%

    \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x \]
  9. Final simplification58.9%

    \[\leadsto x + \frac{-0.3333333333333333 \cdot y}{z} \]
  10. Add Preprocessing

Alternative 16: 30.3% accurate, 15.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.3%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Simplified95.7%

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification24.2%

    \[\leadsto x \]
  6. Add Preprocessing

Developer target: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024041 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

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

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