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

Percentage Accurate: 95.7% → 99.4%
Time: 9.7s
Alternatives: 17
Speedup: 1.0×

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 17 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: 99.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{+34} \lor \neg \left(z \cdot 3 \leq 5 \cdot 10^{-76}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{3 \cdot \left(z \cdot y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -4.9999999999999998e34 or 4.9999999999999998e-76 < (*.f64 z 3)

    1. Initial program 99.8%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in z around 0 99.9%

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

    if -4.9999999999999998e34 < (*.f64 z 3) < 4.9999999999999998e-76

    1. Initial program 85.8%

      \[\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(y - \frac{t}{y}\right)} \]
    3. Step-by-step derivation
      1. associate-*l/99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{+34} \lor \neg \left(z \cdot 3 \leq 5 \cdot 10^{-76}\right):\\ \;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{3 \cdot \left(z \cdot y\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\ \end{array} \]

Alternative 2: 97.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z 3) < -1e10

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e10 < (*.f64 z 3)

    1. Initial program 90.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot 3 \leq -10000000000:\\ \;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\ \end{array} \]

Alternative 3: 87.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-190}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-296}:\\
\;\;\;\;\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\

\mathbf{elif}\;y \leq 210000000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 89.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.4%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.4%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p89.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified89.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative89.6%

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

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

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

    if -2.39999999999999995e-15 < y < -2.20000000000000004e-190 or 1.4e-296 < y < 2.1e8

    1. Initial program 94.0%

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

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

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

    if -2.20000000000000004e-190 < y < 1.4e-296

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} + -0.3333333333333333 \cdot \frac{y}{z} \]
      4. times-frac85.6%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + -0.3333333333333333 \cdot \frac{y}{z} \]
      5. fma-def85.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, -0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      6. metadata-eval85.6%

        \[\leadsto \mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z}\right) \]
      7. distribute-lft-neg-in85.6%

        \[\leadsto \mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}}\right) \]
      8. fma-neg85.6%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
      9. associate-*r/85.6%

        \[\leadsto \color{blue}{\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}} - 0.3333333333333333 \cdot \frac{y}{z} \]
      10. *-commutative85.6%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}}}{z} - 0.3333333333333333 \cdot \frac{y}{z} \]
      11. associate-*r/85.6%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      12. div-sub85.6%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      13. distribute-lft-out--85.6%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Simplified85.6%

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

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}}}{z} \]
    12. Step-by-step derivation
      1. *-commutative85.6%

        \[\leadsto \frac{\color{blue}{\frac{t}{y} \cdot 0.3333333333333333}}{z} \]
    13. Simplified85.6%

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

    if 2.1e8 < y

    1. Initial program 98.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 91.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.8%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.8%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p91.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-15}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-190}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-296}:\\ \;\;\;\;\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 210000000:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 4: 88.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 2.2 \cdot 10^{-296}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.26 \cdot 10^{-61}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\

\mathbf{elif}\;y \leq 3000000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 89.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.4%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.4%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p89.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified89.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative89.6%

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

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

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

    if -7.60000000000000024e-16 < y < 2.20000000000000012e-296 or 1.2599999999999999e-61 < y < 3e6

    1. Initial program 86.9%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    5. Simplified89.8%

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

    if 2.20000000000000012e-296 < y < 1.2599999999999999e-61

    1. Initial program 92.2%

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

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

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

    if 3e6 < y

    1. Initial program 98.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 91.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.8%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.8%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p91.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{-16}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-296}:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.26 \cdot 10^{-61}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 3000000:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 5: 75.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-211}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.8 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 97.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 81.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u48.9%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.7%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.7%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def48.9%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p81.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified81.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative81.6%

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

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

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

    if -1.5999999999999998e-92 < y < 2.5000000000000001e-211 or 3.00000000000000017e-188 < y < 2.8e-113

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot 0.3333333333333333}}{y \cdot z} + -0.3333333333333333 \cdot \frac{y}{z} \]
      4. times-frac73.6%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} + -0.3333333333333333 \cdot \frac{y}{z} \]
      5. fma-def73.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, -0.3333333333333333 \cdot \frac{y}{z}\right)} \]
      6. metadata-eval73.6%

        \[\leadsto \mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z}\right) \]
      7. distribute-lft-neg-in73.6%

        \[\leadsto \mathsf{fma}\left(\frac{t}{y}, \frac{0.3333333333333333}{z}, \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}}\right) \]
      8. fma-neg73.6%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
      9. associate-*r/73.7%

        \[\leadsto \color{blue}{\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}} - 0.3333333333333333 \cdot \frac{y}{z} \]
      10. *-commutative73.7%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}}}{z} - 0.3333333333333333 \cdot \frac{y}{z} \]
      11. associate-*r/73.7%

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      12. div-sub73.7%

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      13. distribute-lft-out--73.7%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    10. Simplified73.7%

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

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \frac{t}{y}}}{z} \]
    12. Step-by-step derivation
      1. *-commutative73.7%

        \[\leadsto \frac{\color{blue}{\frac{t}{y} \cdot 0.3333333333333333}}{z} \]
    13. Simplified73.7%

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

    if 2.5000000000000001e-211 < y < 3.00000000000000017e-188

    1. Initial program 78.9%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 75.4%

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

    if 2.8e-113 < y

    1. Initial program 97.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 85.0%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u55.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef51.0%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr51.0%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def55.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p85.0%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified85.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-92}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-211}:\\ \;\;\;\;\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-188}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 6: 97.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{-194} \lor \neg \left(y \leq 2.7 \cdot 10^{-64}\right):\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{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-194) (not (<= y 2.7e-64)))
   (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z)))
   (+ x (/ (/ t (* z 3.0)) y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -5.2e-194) || !(y <= 2.7e-64)) {
		tmp = x + (-0.3333333333333333 * ((y - (t / 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-194)) .or. (.not. (y <= 2.7d-64))) then
        tmp = x + ((-0.3333333333333333d0) * ((y - (t / 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-194) || !(y <= 2.7e-64)) {
		tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
	} else {
		tmp = x + ((t / (z * 3.0)) / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -5.2e-194) or not (y <= 2.7e-64):
		tmp = x + (-0.3333333333333333 * ((y - (t / 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-194) || !(y <= 2.7e-64))
		tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / 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-194) || ~((y <= 2.7e-64)))
		tmp = x + (-0.3333333333333333 * ((y - (t / 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-194], N[Not[LessEqual[y, 2.7e-64]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $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^{-194} \lor \neg \left(y \leq 2.7 \cdot 10^{-64}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{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.20000000000000003e-194 or 2.69999999999999986e-64 < y

    1. Initial program 96.4%

      \[\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(y - \frac{t}{y}\right)} \]
    3. Taylor expanded in z around 0 98.6%

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

    if -5.20000000000000003e-194 < y < 2.69999999999999986e-64

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    7. Applied egg-rr96.4%

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

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

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

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

        \[\leadsto x + \frac{\frac{t}{z \cdot \color{blue}{3}}}{y} \]
    9. Applied egg-rr96.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{-194} \lor \neg \left(y \leq 2.7 \cdot 10^{-64}\right):\\ \;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \end{array} \]

Alternative 7: 98.0% accurate, 1.0× speedup?

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

    1. Initial program 97.2%

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

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

    if -3.9e-83 < y < 4.1e-64

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    7. Applied egg-rr96.1%

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

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

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

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

        \[\leadsto x + \frac{\frac{t}{z \cdot \color{blue}{3}}}{y} \]
    9. Applied egg-rr96.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{-83} \lor \neg \left(y \leq 4.1 \cdot 10^{-64}\right):\\ \;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \end{array} \]

Alternative 8: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y - \frac{t}{y}\\ \mathbf{if}\;y \leq -3 \cdot 10^{-90}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-64}:\\ \;\;\;\;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 (- y (/ t y))))
   (if (<= y -3e-90)
     (+ x (/ (* -0.3333333333333333 t_1) z))
     (if (<= y 3.8e-64)
       (+ 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 = y - (t / y);
	double tmp;
	if (y <= -3e-90) {
		tmp = x + ((-0.3333333333333333 * t_1) / z);
	} else if (y <= 3.8e-64) {
		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 = y - (t / y)
    if (y <= (-3d-90)) then
        tmp = x + (((-0.3333333333333333d0) * t_1) / z)
    else if (y <= 3.8d-64) 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 = y - (t / y);
	double tmp;
	if (y <= -3e-90) {
		tmp = x + ((-0.3333333333333333 * t_1) / z);
	} else if (y <= 3.8e-64) {
		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 = y - (t / y)
	tmp = 0
	if y <= -3e-90:
		tmp = x + ((-0.3333333333333333 * t_1) / z)
	elif y <= 3.8e-64:
		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(y - Float64(t / y))
	tmp = 0.0
	if (y <= -3e-90)
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * t_1) / z));
	elseif (y <= 3.8e-64)
		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 = y - (t / y);
	tmp = 0.0;
	if (y <= -3e-90)
		tmp = x + ((-0.3333333333333333 * t_1) / z);
	elseif (y <= 3.8e-64)
		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[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e-90], N[(x + N[(N[(-0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-64], 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 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3 \cdot 10^{-90}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-64}:\\
\;\;\;\;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.0000000000000002e-90

    1. Initial program 97.2%

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

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

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

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

    if -3.0000000000000002e-90 < y < 3.8000000000000002e-64

    1. Initial program 86.7%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{z \cdot y}} \]
      3. times-frac87.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t \cdot \frac{0.3333333333333333}{z}}{y}} \]
    7. Applied egg-rr96.1%

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

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

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

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

        \[\leadsto x + \frac{\frac{t}{z \cdot \color{blue}{3}}}{y} \]
    9. Applied egg-rr96.2%

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

    if 3.8000000000000002e-64 < y

    1. Initial program 97.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-90}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 9: 91.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-16}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\

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

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


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

    1. Initial program 96.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 89.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.4%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.4%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p89.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified89.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative89.6%

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

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

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

    if -4.10000000000000006e-16 < y < 10500

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{z \cdot y}} \]
      3. times-frac86.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    5. Simplified86.7%

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

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

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

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

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

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

    if 10500 < y

    1. Initial program 98.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 91.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.8%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.8%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p91.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{-16}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 10500:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 10: 91.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-17}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\

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

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


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

    1. Initial program 96.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 89.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.4%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.4%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p89.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified89.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative89.6%

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

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

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

    if -8.00000000000000057e-17 < y < 6.6e5

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{z \cdot y}} \]
      3. times-frac86.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    5. Simplified86.7%

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

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

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

    if 6.6e5 < y

    1. Initial program 98.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 91.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.8%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.8%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p91.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-17}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 660000:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 11: 91.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-18}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\

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

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


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

    1. Initial program 96.6%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 89.6%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.4%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.4%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p89.6%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
    6. Simplified89.5%

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

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

        \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative89.6%

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

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

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

    if -5.00000000000000036e-18 < y < 2.4e5

    1. Initial program 89.0%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{z \cdot y}} \]
      3. times-frac86.7%

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

        \[\leadsto x + \color{blue}{\frac{t}{y} \cdot \frac{0.3333333333333333}{z}} \]
    5. Simplified86.7%

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

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

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

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

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

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

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

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

    if 2.4e5 < y

    1. Initial program 98.2%

      \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    2. Taylor expanded in t around 0 91.7%

      \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
    3. Step-by-step derivation
      1. expm1-log1p-u50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-udef46.8%

        \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    4. Applied egg-rr46.8%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
    5. Step-by-step derivation
      1. expm1-def50.1%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p91.7%

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

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 240000:\\ \;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\ \end{array} \]

Alternative 12: 47.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+64}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6999999999999999e33 or 9.8000000000000005e64 < z

    1. Initial program 99.8%

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

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

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

    if -3.6999999999999999e33 < z < 9.8000000000000005e64

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+64}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 47.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999989e34 or 7.19999999999999957e65 < z

    1. Initial program 99.8%

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

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

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

    if -1.54999999999999989e34 < z < 7.19999999999999957e65

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\color{blue}{{\left(\frac{3}{\frac{t}{y}}\right)}^{-1}}}{z} \]
    6. Step-by-step derivation
      1. unpow-197.6%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. *-commutative50.7%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    10. Simplified50.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+65}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 47.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.1999999999999999e33 or 3.8000000000000002e67 < z

    1. Initial program 99.8%

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

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

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

    if -8.1999999999999999e33 < z < 3.8000000000000002e67

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} \]
      2. *-commutative50.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
    10. Simplified50.7%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{-0.3333333333333333}}} \]
    11. Taylor expanded in z around 0 50.7%

      \[\leadsto \frac{y}{\color{blue}{-3 \cdot z}} \]
    12. Step-by-step derivation
      1. *-commutative50.7%

        \[\leadsto \frac{y}{\color{blue}{z \cdot -3}} \]
    13. Simplified50.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+67}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 64.6% accurate, 2.1× speedup?

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

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

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Taylor expanded in t around 0 63.1%

    \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Final simplification63.1%

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

Alternative 16: 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.9%

    \[\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
  2. Taylor expanded in t around 0 63.1%

    \[\leadsto \color{blue}{x - 0.3333333333333333 \cdot \frac{y}{z}} \]
  3. Step-by-step derivation
    1. expm1-log1p-u42.7%

      \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
    2. expm1-udef40.5%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
  4. Applied egg-rr40.5%

    \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)} - 1\right)} \]
  5. Step-by-step derivation
    1. expm1-def42.7%

      \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3333333333333333 \cdot \frac{y}{z}\right)\right)} \]
    2. expm1-log1p63.1%

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
  6. Simplified63.1%

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
    2. *-commutative63.1%

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

      \[\leadsto x - \color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
  9. Simplified63.1%

    \[\leadsto x - \color{blue}{y \cdot \frac{0.3333333333333333}{z}} \]
  10. Final simplification63.1%

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

Alternative 17: 30.1% 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.9%

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification29.9%

    \[\leadsto x \]

Developer target: 95.9% 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 2023297 
(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))))