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

Percentage Accurate: 95.8% → 98.7%
Time: 11.9s
Alternatives: 22
Speedup: 1.4×

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 22 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.8% 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: 98.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 7.5 \cdot 10^{-5}\right):\\ \;\;\;\;\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 (or (<= z -2.8e+76) (not (<= z 7.5e-5)))
   (+
    (+ 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 <= -2.8e+76) || !(z <= 7.5e-5)) {
		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 <= (-2.8d+76)) .or. (.not. (z <= 7.5d-5))) 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 <= -2.8e+76) || !(z <= 7.5e-5)) {
		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 <= -2.8e+76) or not (z <= 7.5e-5):
		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 ((z <= -2.8e+76) || !(z <= 7.5e-5))
		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 <= -2.8e+76) || ~((z <= 7.5e-5)))
		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[Or[LessEqual[z, -2.8e+76], N[Not[LessEqual[z, 7.5e-5]], $MachinePrecision]], 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 \leq -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 7.5 \cdot 10^{-5}\right):\\
\;\;\;\;\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 z < -2.7999999999999999e76 or 7.49999999999999934e-5 < z

    1. Initial program 99.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-neg99.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-neg99.0%

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

        \[\leadsto \left(x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      4. *-commutative99.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-frac99.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-eval99.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.9%

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

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

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

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

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

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

        \[\leadsto \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{1}{z} \cdot \color{blue}{\frac{t}{3 \cdot y}} \]
      5. times-frac99.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*99.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. *-commutative99.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-frac97.3%

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

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

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

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

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

      \[\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/97.4%

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

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

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

    if -2.7999999999999999e76 < z < 7.49999999999999934e-5

    1. Initial program 91.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 7.5 \cdot 10^{-5}\right):\\ \;\;\;\;\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 2: 97.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 2.00000000000000003e306

    1. Initial program 97.9%

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

    if 2.00000000000000003e306 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y)))

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub99.9%

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      6. associate-/l*99.9%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}} \]
    8. Simplified99.9%

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

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

Alternative 3: 98.7% accurate, 0.8× speedup?

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

    1. Initial program 99.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-neg99.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-neg99.0%

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

        \[\leadsto \left(x + \frac{\color{blue}{-1 \cdot y}}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      4. *-commutative99.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-frac99.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-eval99.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.9%

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

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

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

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

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

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

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

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

    if -6.30000000000000036e75 < z < 3.19999999999999986e-5

    1. Initial program 91.3%

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

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

Alternative 4: 90.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+130}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -3.29999999999999984e-24 < y < 5.4999999999999997e26

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999997e26 < y < 4.50000000000000039e130

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef9.4%

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

      \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    8. Step-by-step derivation
      1. expm1-def69.3%

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--74.3%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y \cdot z} - \frac{y}{z}\right)} \]
      2. associate-/r*78.0%

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

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

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

    if 4.50000000000000039e130 < y

    1. Initial program 96.6%

      \[\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. Taylor expanded in y around inf 99.7%

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{-0.3333333333333333}}} \cdot y \]
      2. inv-pow99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+130}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 5: 90.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+25}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+134}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -3.29999999999999984e-24 < y < 1.50000000000000003e25

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 1.50000000000000003e25 < y < 4.4999999999999997e134

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub86.8%

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
      6. associate-/l*86.7%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}} \]
    8. Simplified86.7%

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

    if 4.4999999999999997e134 < y

    1. Initial program 96.6%

      \[\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. Taylor expanded in y around inf 99.7%

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{-0.3333333333333333}}} \cdot y \]
      2. inv-pow99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+25}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+134}:\\ \;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 6: 90.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -6.9999999999999997e-26 < y < 1.55e26

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 1.55e26 < y < 3.5000000000000001e130

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub86.8%

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

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

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

    if 3.5000000000000001e130 < y

    1. Initial program 96.6%

      \[\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. Taylor expanded in y around inf 99.7%

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{z}{-0.3333333333333333}}} \cdot y \]
      2. inv-pow99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-26}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+130}:\\ \;\;\;\;\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\ \end{array} \]

Alternative 7: 80.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq 8.6 \cdot 10^{+116}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\

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


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

    1. Initial program 98.8%

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

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

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

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

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

    if -1.42e-61 < z < 8.6e116

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u77.5%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef29.9%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr29.9%

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

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-log1p91.0%

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{t}{y \cdot z} - 0.3333333333333333 \cdot \frac{y}{z}} \]
    11. Step-by-step derivation
      1. distribute-lft-out--82.4%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y \cdot z} - \frac{y}{z}\right)} \]
      2. associate-/r*87.1%

        \[\leadsto 0.3333333333333333 \cdot \left(\color{blue}{\frac{\frac{t}{y}}{z}} - \frac{y}{z}\right) \]
      3. div-sub90.1%

        \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{\frac{t}{y} - y}{z}} \]
    12. Simplified90.1%

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

    if 8.6e116 < z

    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 t around 0 80.5%

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

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

Alternative 8: 90.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -2.30000000000000011e-34 < y < 1.5e28

    1. Initial program 93.4%

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

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

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

    if 1.5e28 < y

    1. Initial program 92.4%

      \[\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. Taylor expanded in y around inf 87.5%

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

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

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

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

Alternative 9: 90.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 2 \cdot 10^{+28}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -3.1e-24 < y < 1.99999999999999992e28

    1. Initial program 93.4%

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

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

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

    if 1.99999999999999992e28 < y

    1. Initial program 92.4%

      \[\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. Taylor expanded in y around inf 87.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{-24}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+28}:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \end{array} \]

Alternative 10: 90.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\

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


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

    1. Initial program 98.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 91.3%

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

    if -3.20000000000000012e-24 < y < 2.39999999999999981e28

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 2.39999999999999981e28 < y

    1. Initial program 92.4%

      \[\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. Taylor expanded in y around inf 87.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-24}:\\ \;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \end{array} \]

Alternative 11: 78.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-114} \lor \neg \left(y \leq 2.75 \cdot 10^{-38}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.39999999999999981e-114 or 2.75000000000000003e-38 < y

    1. Initial program 96.7%

      \[\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)} \]
    3. Taylor expanded in y around inf 86.3%

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

    if -3.39999999999999981e-114 < y < 2.75000000000000003e-38

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u58.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef47.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr47.0%

      \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    8. Step-by-step derivation
      1. expm1-def58.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac65.9%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative65.9%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    12. Simplified65.9%

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

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

Alternative 12: 78.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-112} \lor \neg \left(y \leq 7.9 \cdot 10^{-35}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.80000000000000023e-112 or 7.89999999999999983e-35 < y

    1. Initial program 96.7%

      \[\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)} \]
    3. Taylor expanded in y around inf 86.3%

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

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

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

    if -2.80000000000000023e-112 < y < 7.89999999999999983e-35

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u58.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef47.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr47.0%

      \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    8. Step-by-step derivation
      1. expm1-def58.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac65.9%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative65.9%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    12. Simplified65.9%

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

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

Alternative 13: 62.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-25}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} \]
    8. Simplified61.1%

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

    if -4.80000000000000018e-25 < y < 1.7e28

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u56.5%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef43.5%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr43.5%

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

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-log1p93.4%

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

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

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

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

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

    if 1.7e28 < y

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      6. distribute-lft-out--99.7%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative69.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified69.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-25}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 14: 63.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} \]
    8. Simplified61.1%

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

    if -3.29999999999999984e-24 < y < 1.5e28

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      6. distribute-lft-out--89.2%

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

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

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

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

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

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

    if 1.5e28 < y

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      6. distribute-lft-out--99.7%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative69.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified69.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 15: 63.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-31}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot -0.3333333333333333} \]
    8. Simplified61.1%

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

    if -5.8000000000000001e-31 < y < 1.5e28

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u56.5%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef43.5%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr43.5%

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

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-log1p93.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    12. Simplified60.3%

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

    if 1.5e28 < y

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      6. distribute-lft-out--99.7%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative69.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified69.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{-31}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 16: 78.5% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 98.7%

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

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

    if -9.6000000000000006e-105 < y < 1.7499999999999999e-33

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    6. Step-by-step derivation
      1. expm1-log1p-u58.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)\right)}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
      2. expm1-udef47.0%

        \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    7. Applied egg-rr47.0%

      \[\leadsto \left(x - \frac{1}{\color{blue}{e^{\mathsf{log1p}\left(3 \cdot \frac{z}{y}\right)} - 1}}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y} \]
    8. Step-by-step derivation
      1. expm1-def58.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. times-frac65.9%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{y} \cdot \frac{t}{z}} \]
      3. *-commutative65.9%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{0.3333333333333333}{y}} \]
    12. Simplified65.9%

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

    if 1.7499999999999999e-33 < y

    1. Initial program 93.7%

      \[\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. Taylor expanded in y around inf 83.9%

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

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

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

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

Alternative 17: 96.0% accurate, 1.4× speedup?

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

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

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

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

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

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

Alternative 18: 96.0% accurate, 1.4× speedup?

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

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

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

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

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

Alternative 19: 96.0% accurate, 1.4× speedup?

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

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

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

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

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

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

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

Alternative 20: 48.3% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.40000000000000043e89 or 4e15 < z

    1. Initial program 98.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 x around inf 57.4%

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

    if -9.40000000000000043e89 < z < 4e15

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{0.3333333333333333 \cdot \frac{t}{y} - 0.3333333333333333 \cdot y}{z}} \]
      6. distribute-lft-out--99.2%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative49.8%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-0.3333333333333333}{z}} \]
    11. Simplified49.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.4 \cdot 10^{+89}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 48.3% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1e92 or 1.16e21 < z

    1. Initial program 98.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 x around inf 57.4%

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

    if -1e92 < z < 1.16e21

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.3333333333333333 \cdot \frac{t}{y}}{z} - \color{blue}{\frac{0.3333333333333333 \cdot y}{z}} \]
      4. div-sub89.2%

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}{z} \]
    8. Simplified89.2%

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

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

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{z} \]
    11. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+21}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 30.2% 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 94.9%

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

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

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

    \[\leadsto x \]

Developer target: 95.6% 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 2023290 
(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))))