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

Percentage Accurate: 96.2% → 97.5%
Time: 10.9s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 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: 96.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-75} \lor \neg \left(y \leq 1.6 \cdot 10^{-223}\right):\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.49999999999999989e-75 or 1.6e-223 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999989e-75 < y < 1.6e-223

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.5% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.90000000000000014e159 < t

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.7% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

    if -4.0000000000000002e76 < (*.f64 z 3)

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.8% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 99.8%

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

    if -9.9999999999999998e23 < (*.f64 z 3)

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 96.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e160 < t

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-75} \lor \neg \left(y \leq 2 \cdot 10^{-39}\right):\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.59999999999999988e-75 or 1.99999999999999986e-39 < y

    1. Initial program 98.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(\frac{t}{y} - y\right)} \]
    3. Add Preprocessing

    if -1.59999999999999988e-75 < y < 1.99999999999999986e-39

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 89.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y

    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. associate-*l*99.0%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-26 < y < 1.36000000000000006e69

    1. Initial program 93.8%

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

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

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

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

Alternative 8: 91.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y

    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. associate-*l*99.0%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-26 < y < 1.36000000000000006e69

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333}{\color{blue}{y \cdot \frac{1}{\frac{t}{z}}}} \]
      10. clear-num96.7%

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

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

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

Alternative 9: 91.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 3.8 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4000000000000001e-26 or 3.80000000000000028e69 < y

    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. associate-*l*99.0%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-26 < y < 3.80000000000000028e69

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333}{\color{blue}{y \cdot \frac{1}{\frac{t}{z}}}} \]
      10. clear-num96.7%

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

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

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

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

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

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

Alternative 10: 91.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y

    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. associate-*l*99.0%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-26 < y < 1.36000000000000006e69

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{y} \cdot \frac{1}{\color{blue}{z \cdot 3}} + x \]
      6. div-inv89.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{3} \cdot \frac{\frac{1}{y}}{z}} + x \]
    10. Step-by-step derivation
      1. frac-times89.4%

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

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

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

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

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

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

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

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

Alternative 11: 91.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26}:\\
\;\;\;\;x + y \cdot \frac{\frac{-1}{z}}{3}\\

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{1}{3}} \cdot \frac{y}{z} \]
      2. times-frac97.0%

        \[\leadsto x - \color{blue}{\frac{1 \cdot y}{3 \cdot z}} \]
      3. *-un-lft-identity97.0%

        \[\leadsto x - \frac{\color{blue}{y}}{3 \cdot z} \]
      4. *-commutative97.0%

        \[\leadsto x - \frac{y}{\color{blue}{z \cdot 3}} \]
      5. clear-num97.1%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{z \cdot 3}{y}}} \]
    7. Applied egg-rr97.1%

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

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

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

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

    if -1.4000000000000001e-26 < y < 1.5499999999999999e69

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{y} \cdot \frac{1}{\color{blue}{z \cdot 3}} + x \]
      6. div-inv89.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{3} \cdot \frac{\frac{1}{y}}{z}} + x \]
    10. Step-by-step derivation
      1. frac-times89.4%

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

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

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

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

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

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

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

    if 1.5499999999999999e69 < y

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-26}:\\ \;\;\;\;x + y \cdot \frac{\frac{-1}{z}}{3}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+69}:\\ \;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z \cdot 3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

Alternative 13: 63.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{0.3333333333333333}{\frac{z}{y}}} \]
  7. Applied egg-rr66.2%

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

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

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

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

Alternative 14: 63.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x - \frac{\color{blue}{y}}{z \cdot 3} \]
  8. Final simplification66.2%

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

Alternative 15: 30.1% accurate, 15.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 96.4%

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification29.0%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 96.1% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024010 
(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))))