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

Percentage Accurate: 95.9% → 96.3%
Time: 12.0s
Alternatives: 13
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 13 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.9% 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: 96.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z #s(literal 3 binary64)) < 4.00000000000000033e-217

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000033e-217 < (*.f64 z #s(literal 3 binary64))

    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
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 97.0% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 4.9999999999999997e236

    1. Initial program 97.8%

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

    if 4.9999999999999997e236 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y)))

    1. Initial program 87.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-neg87.0%

        \[\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+87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 62.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-46}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+68}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.5000000000000001e47

    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. sub-neg99.8%

        \[\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+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{z \cdot -3}} \]
    8. Taylor expanded in x around 0 69.0%

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

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

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

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

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

    if -1.5000000000000001e47 < y < -1.1e-46 or 3.7999999999999997e-58 < y < 1.09999999999999994e68

    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. sub-neg96.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e-46 < y < 3.7999999999999997e-58

    1. Initial program 93.6%

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

        \[\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+93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot z} \]
      6. add-sqr-sqrt19.9%

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{-\color{blue}{z \cdot y}} \]
      9. distribute-lft-neg-in19.9%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt87.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{z}} \cdot \frac{t}{-y} \]
      18. clear-num77.6%

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

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

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

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

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

    if 1.09999999999999994e68 < y

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{{\left(\frac{z}{y \cdot 0.3333333333333333}\right)}^{-1}} \]
      3. *-un-lft-identity94.6%

        \[\leadsto x - {\left(\frac{\color{blue}{1 \cdot z}}{y \cdot 0.3333333333333333}\right)}^{-1} \]
      4. *-commutative94.6%

        \[\leadsto x - {\left(\frac{1 \cdot z}{\color{blue}{0.3333333333333333 \cdot y}}\right)}^{-1} \]
      5. times-frac94.7%

        \[\leadsto x - {\color{blue}{\left(\frac{1}{0.3333333333333333} \cdot \frac{z}{y}\right)}}^{-1} \]
      6. metadata-eval94.7%

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

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

        \[\leadsto x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}} \]
    11. Simplified94.7%

      \[\leadsto x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}} \]
    12. Taylor expanded in x around 0 65.2%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    13. Step-by-step derivation
      1. metadata-eval65.2%

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

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in65.2%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(-\frac{y}{z}\right)} \]
      4. metadata-eval65.2%

        \[\leadsto \color{blue}{\frac{-1}{-3}} \cdot \left(-\frac{y}{z}\right) \]
      5. distribute-neg-frac65.2%

        \[\leadsto \frac{-1}{-3} \cdot \color{blue}{\frac{-y}{z}} \]
      6. times-frac65.3%

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

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

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

        \[\leadsto \frac{\color{blue}{y}}{z \cdot -3} \]
    14. Simplified65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-58}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 97.1%

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

        \[\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+97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-75 < y < 1.79999999999999992e-121

    1. Initial program 94.7%

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

        \[\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+94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{-\color{blue}{z \cdot y}} \]
      9. distribute-lft-neg-in20.3%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt94.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999992e-121 < y

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.5999999999999999e-77 or 9.5000000000000002e-122 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5999999999999999e-77 < y < 9.5000000000000002e-122

    1. Initial program 94.7%

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

        \[\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+94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{-\color{blue}{z \cdot y}} \]
      9. distribute-lft-neg-in20.3%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt94.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 92.1% accurate, 0.8× speedup?

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

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

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

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


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

    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. sub-neg99.8%

        \[\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+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000001e67 < y < 2e12

    1. Initial program 94.5%

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

        \[\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+94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt87.2%

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

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

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

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

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

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

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

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

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

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

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

    if 2e12 < y

    1. Initial program 96.9%

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

        \[\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+97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot 1}{z \cdot -3}} \]
      4. *-rgt-identity94.6%

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

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

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

Alternative 7: 90.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.1%

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

        \[\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+99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e8 < y < 6.8e13

    1. Initial program 94.2%

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

        \[\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+94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8e13 < y

    1. Initial program 96.9%

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

        \[\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+97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y \cdot 1}{z \cdot -3}} \]
      4. *-rgt-identity94.6%

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

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

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

Alternative 8: 77.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-47} \lor \neg \left(y \leq 1.02 \cdot 10^{-103}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.9999999999999998e-47 or 1.01999999999999998e-103 < y

    1. Initial program 97.8%

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

        \[\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+97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999998e-47 < y < 1.01999999999999998e-103

    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. sub-neg92.9%

        \[\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+92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot z} \]
      6. add-sqr-sqrt19.4%

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{-\color{blue}{z \cdot y}} \]
      9. distribute-lft-neg-in19.4%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt91.8%

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

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

        \[\leadsto x + \frac{\color{blue}{--0.3333333333333333}}{-z} \cdot \frac{t}{-y} \]
      17. frac-2neg82.8%

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{z}} \cdot \frac{t}{-y} \]
      18. clear-num82.8%

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

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

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

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

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

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

Alternative 9: 77.0% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 98.1%

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

        \[\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+98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.30000000000000042e-47 < y < 1.24999999999999995e-104

    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. sub-neg92.9%

        \[\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+92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot z} \]
      6. add-sqr-sqrt19.4%

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{-\color{blue}{z \cdot y}} \]
      9. distribute-lft-neg-in19.4%

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

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

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

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

        \[\leadsto x + \frac{0.3333333333333333 \cdot t}{\left(-z\right) \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      14. add-sqr-sqrt91.8%

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

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

        \[\leadsto x + \frac{\color{blue}{--0.3333333333333333}}{-z} \cdot \frac{t}{-y} \]
      17. frac-2neg82.8%

        \[\leadsto x + \color{blue}{\frac{-0.3333333333333333}{z}} \cdot \frac{t}{-y} \]
      18. clear-num82.8%

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

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

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

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

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

    if 1.24999999999999995e-104 < y

    1. Initial program 97.6%

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

        \[\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+97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{y}}{z \cdot -3} \]
    7. Simplified86.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.3 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-104}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 46.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8500000000000001e51 or 2.49999999999999982e-35 < z

    1. Initial program 98.7%

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

        \[\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+98.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.8500000000000001e51 < z < 2.49999999999999982e-35

    1. Initial program 93.7%

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

        \[\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+93.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-0.3333333333333333\right)} \cdot \frac{y}{z} \]
      2. cancel-sign-sub-inv66.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{1}{3 \cdot \frac{z}{y}}} \]
    12. Taylor expanded in x around 0 57.5%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
    13. Step-by-step derivation
      1. metadata-eval57.5%

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

        \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in57.5%

        \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(-\frac{y}{z}\right)} \]
      4. metadata-eval57.5%

        \[\leadsto \color{blue}{\frac{-1}{-3}} \cdot \left(-\frac{y}{z}\right) \]
      5. distribute-neg-frac57.5%

        \[\leadsto \frac{-1}{-3} \cdot \color{blue}{\frac{-y}{z}} \]
      6. times-frac57.6%

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

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

        \[\leadsto \frac{\color{blue}{-\left(-y\right)}}{z \cdot -3} \]
      9. remove-double-neg57.6%

        \[\leadsto \frac{\color{blue}{y}}{z \cdot -3} \]
    14. Simplified57.6%

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

Alternative 11: 46.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-35}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8e53 or 2.49999999999999982e-35 < z

    1. Initial program 98.7%

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

        \[\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+98.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e53 < z < 2.49999999999999982e-35

    1. Initial program 93.7%

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

        \[\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+93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{z \cdot -3}} \]
    8. Taylor expanded in x around 0 57.5%

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

Alternative 12: 95.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 30.3% accurate, 15.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 96.0% 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 2024170 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))

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