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

Percentage Accurate: 95.8% → 97.4%
Time: 15.2s
Alternatives: 19
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.8% accurate, 1.0× speedup?

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

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

Alternative 1: 97.4% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 92.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-neg92.8%

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

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

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

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

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

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

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

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

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

    if 4e-14 < t

    1. Initial program 97.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-neg97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{t \cdot \frac{1}{y}}{3 \cdot z}} + \left(x + -0.3333333333333333 \cdot \frac{y}{z}\right)\right)} - 1 \]
      5. div-inv41.0%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{t}{y}}{3 \cdot z} + \color{blue}{\left(-0.3333333333333333 \cdot \frac{y}{z} + x\right)}\right)} - 1 \]
      7. associate-*r/41.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{t}{y}}{3 \cdot z} + \left(\color{blue}{\frac{-0.3333333333333333 \cdot y}{z}} + x\right)\right)} - 1 \]
      8. associate-*l/41.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{t}{y}}{3 \cdot z} + \left(\color{blue}{\frac{-0.3333333333333333}{z} \cdot y} + x\right)\right)} - 1 \]
      9. *-commutative41.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{t}{y}}{3 \cdot z} + \left(\color{blue}{y \cdot \frac{-0.3333333333333333}{z}} + x\right)\right)} - 1 \]
      10. fma-def41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 63.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
t_2 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\

\mathbf{elif}\;y \leq -0.0008:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -1.82 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+81}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 98.2%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 65.5%

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

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

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

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

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

    if -5.79999999999999961e47 < y < -8.00000000000000038e-4 or 6.1999999999999998e-201 < y < 7.7999999999999999e-191 or 8.5e-17 < y < 3.2e81

    1. Initial program 99.8%

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

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

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

    if -8.00000000000000038e-4 < y < -1.8199999999999999e-6 or 3.2e81 < y

    1. Initial program 96.8%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 71.6%

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

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

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

    if -1.8199999999999999e-6 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 8.5e-17

    1. Initial program 89.8%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 60.7%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac66.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -0.0008:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.82 \cdot 10^{-6}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 3: 63.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{if}\;y \leq -9.2 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -245:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
   (if (<= y -9.2e+49)
     (* y (/ -0.3333333333333333 z))
     (if (<= y -3.4e+24)
       (* 0.3333333333333333 (/ t (* y z)))
       (if (<= y -245.0)
         x
         (if (<= y 6.2e-201)
           t_1
           (if (<= y 9.2e-191)
             x
             (if (<= y 8.5e-17)
               t_1
               (if (<= y 3.5e+81) x (* -0.3333333333333333 (/ y z)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double tmp;
	if (y <= -9.2e+49) {
		tmp = y * (-0.3333333333333333 / z);
	} else if (y <= -3.4e+24) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= -245.0) {
		tmp = x;
	} else if (y <= 6.2e-201) {
		tmp = t_1;
	} else if (y <= 9.2e-191) {
		tmp = x;
	} else if (y <= 8.5e-17) {
		tmp = t_1;
	} else if (y <= 3.5e+81) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 * (y / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t / z) * (0.3333333333333333d0 / y)
    if (y <= (-9.2d+49)) then
        tmp = y * ((-0.3333333333333333d0) / z)
    else if (y <= (-3.4d+24)) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if (y <= (-245.0d0)) then
        tmp = x
    else if (y <= 6.2d-201) then
        tmp = t_1
    else if (y <= 9.2d-191) then
        tmp = x
    else if (y <= 8.5d-17) then
        tmp = t_1
    else if (y <= 3.5d+81) then
        tmp = x
    else
        tmp = (-0.3333333333333333d0) * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double tmp;
	if (y <= -9.2e+49) {
		tmp = y * (-0.3333333333333333 / z);
	} else if (y <= -3.4e+24) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= -245.0) {
		tmp = x;
	} else if (y <= 6.2e-201) {
		tmp = t_1;
	} else if (y <= 9.2e-191) {
		tmp = x;
	} else if (y <= 8.5e-17) {
		tmp = t_1;
	} else if (y <= 3.5e+81) {
		tmp = x;
	} else {
		tmp = -0.3333333333333333 * (y / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / z) * (0.3333333333333333 / y)
	tmp = 0
	if y <= -9.2e+49:
		tmp = y * (-0.3333333333333333 / z)
	elif y <= -3.4e+24:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif y <= -245.0:
		tmp = x
	elif y <= 6.2e-201:
		tmp = t_1
	elif y <= 9.2e-191:
		tmp = x
	elif y <= 8.5e-17:
		tmp = t_1
	elif y <= 3.5e+81:
		tmp = x
	else:
		tmp = -0.3333333333333333 * (y / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y))
	tmp = 0.0
	if (y <= -9.2e+49)
		tmp = Float64(y * Float64(-0.3333333333333333 / z));
	elseif (y <= -3.4e+24)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif (y <= -245.0)
		tmp = x;
	elseif (y <= 6.2e-201)
		tmp = t_1;
	elseif (y <= 9.2e-191)
		tmp = x;
	elseif (y <= 8.5e-17)
		tmp = t_1;
	elseif (y <= 3.5e+81)
		tmp = x;
	else
		tmp = Float64(-0.3333333333333333 * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / z) * (0.3333333333333333 / y);
	tmp = 0.0;
	if (y <= -9.2e+49)
		tmp = y * (-0.3333333333333333 / z);
	elseif (y <= -3.4e+24)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif (y <= -245.0)
		tmp = x;
	elseif (y <= 6.2e-201)
		tmp = t_1;
	elseif (y <= 9.2e-191)
		tmp = x;
	elseif (y <= 8.5e-17)
		tmp = t_1;
	elseif (y <= 3.5e+81)
		tmp = x;
	else
		tmp = -0.3333333333333333 * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+49], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e+24], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -245.0], x, If[LessEqual[y, 6.2e-201], t$95$1, If[LessEqual[y, 9.2e-191], x, If[LessEqual[y, 8.5e-17], t$95$1, If[LessEqual[y, 3.5e+81], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -245:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -9.20000000000000008e49

    1. Initial program 98.2%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 67.5%

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

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

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

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

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

    if -9.20000000000000008e49 < y < -3.4000000000000001e24

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 82.9%

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

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

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

    if -3.4000000000000001e24 < y < -245 or 6.1999999999999998e-201 < y < 9.20000000000000042e-191 or 8.5e-17 < y < 3.5e81

    1. Initial program 99.9%

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

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

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

    if -245 < y < 6.1999999999999998e-201 or 9.20000000000000042e-191 < y < 8.5e-17

    1. Initial program 89.9%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 59.9%

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

        \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot t}{y \cdot z}} \]
      2. *-commutative59.8%

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

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

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

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

    if 3.5e81 < y

    1. Initial program 96.6%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 69.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -245:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 4: 76.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.4 \cdot 10^{-15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 5.1 \cdot 10^{-113}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.10000000000000011e49 or -1.85000000000000001e27 < y < -1.40000000000000007e-15 or 5.09999999999999979e-113 < y

    1. Initial program 97.5%

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

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

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

    if -2.10000000000000011e49 < y < -1.85000000000000001e27

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 82.9%

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

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

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

    if -1.40000000000000007e-15 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 5.09999999999999979e-113

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 62.6%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac68.5%

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

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

    if 6.1999999999999998e-201 < y < 7.7999999999999999e-191

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-15}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{-113}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \end{array} \]

Alternative 5: 76.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -5.8 \cdot 10^{-20}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-190}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.10000000000000011e49

    1. Initial program 98.2%

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

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

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

    if -2.10000000000000011e49 < y < -1.85000000000000001e27

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 82.9%

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

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

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

    if -1.85000000000000001e27 < y < -5.8e-20 or 1.44999999999999996e-112 < y

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e-20 < y < 5.8000000000000003e-201 or 1.04999999999999996e-190 < y < 1.44999999999999996e-112

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 62.6%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac68.5%

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

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

    if 5.8000000000000003e-201 < y < 1.04999999999999996e-190

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-112}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \end{array} \]

Alternative 6: 76.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
   (if (<= y -2.4e+49)
     (+ x (* y (/ -0.3333333333333333 z)))
     (if (<= y -1.85e+27)
       (* 0.3333333333333333 (/ t (* y z)))
       (if (<= y -7e-19)
         (+ x (/ y (* z -3.0)))
         (if (<= y 3.5e-201)
           t_1
           (if (<= y 7.8e-191)
             x
             (if (<= y 1.25e-113)
               t_1
               (+ x (/ (* -0.3333333333333333 y) z))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double tmp;
	if (y <= -2.4e+49) {
		tmp = x + (y * (-0.3333333333333333 / z));
	} else if (y <= -1.85e+27) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= -7e-19) {
		tmp = x + (y / (z * -3.0));
	} else if (y <= 3.5e-201) {
		tmp = t_1;
	} else if (y <= 7.8e-191) {
		tmp = x;
	} else if (y <= 1.25e-113) {
		tmp = t_1;
	} else {
		tmp = x + ((-0.3333333333333333 * y) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t / z) * (0.3333333333333333d0 / y)
    if (y <= (-2.4d+49)) then
        tmp = x + (y * ((-0.3333333333333333d0) / z))
    else if (y <= (-1.85d+27)) then
        tmp = 0.3333333333333333d0 * (t / (y * z))
    else if (y <= (-7d-19)) then
        tmp = x + (y / (z * (-3.0d0)))
    else if (y <= 3.5d-201) then
        tmp = t_1
    else if (y <= 7.8d-191) then
        tmp = x
    else if (y <= 1.25d-113) then
        tmp = t_1
    else
        tmp = x + (((-0.3333333333333333d0) * y) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (t / z) * (0.3333333333333333 / y);
	double tmp;
	if (y <= -2.4e+49) {
		tmp = x + (y * (-0.3333333333333333 / z));
	} else if (y <= -1.85e+27) {
		tmp = 0.3333333333333333 * (t / (y * z));
	} else if (y <= -7e-19) {
		tmp = x + (y / (z * -3.0));
	} else if (y <= 3.5e-201) {
		tmp = t_1;
	} else if (y <= 7.8e-191) {
		tmp = x;
	} else if (y <= 1.25e-113) {
		tmp = t_1;
	} else {
		tmp = x + ((-0.3333333333333333 * y) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (t / z) * (0.3333333333333333 / y)
	tmp = 0
	if y <= -2.4e+49:
		tmp = x + (y * (-0.3333333333333333 / z))
	elif y <= -1.85e+27:
		tmp = 0.3333333333333333 * (t / (y * z))
	elif y <= -7e-19:
		tmp = x + (y / (z * -3.0))
	elif y <= 3.5e-201:
		tmp = t_1
	elif y <= 7.8e-191:
		tmp = x
	elif y <= 1.25e-113:
		tmp = t_1
	else:
		tmp = x + ((-0.3333333333333333 * y) / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y))
	tmp = 0.0
	if (y <= -2.4e+49)
		tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z)));
	elseif (y <= -1.85e+27)
		tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z)));
	elseif (y <= -7e-19)
		tmp = Float64(x + Float64(y / Float64(z * -3.0)));
	elseif (y <= 3.5e-201)
		tmp = t_1;
	elseif (y <= 7.8e-191)
		tmp = x;
	elseif (y <= 1.25e-113)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (t / z) * (0.3333333333333333 / y);
	tmp = 0.0;
	if (y <= -2.4e+49)
		tmp = x + (y * (-0.3333333333333333 / z));
	elseif (y <= -1.85e+27)
		tmp = 0.3333333333333333 * (t / (y * z));
	elseif (y <= -7e-19)
		tmp = x + (y / (z * -3.0));
	elseif (y <= 3.5e-201)
		tmp = t_1;
	elseif (y <= 7.8e-191)
		tmp = x;
	elseif (y <= 1.25e-113)
		tmp = t_1;
	else
		tmp = x + ((-0.3333333333333333 * y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+49], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e+27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-19], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-201], t$95$1, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 1.25e-113], t$95$1, N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.4e49

    1. Initial program 98.2%

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

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

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

    if -2.4e49 < y < -1.85000000000000001e27

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 82.9%

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

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

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

    if -1.85000000000000001e27 < y < -7.00000000000000031e-19

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000031e-19 < y < 3.50000000000000008e-201 or 7.7999999999999999e-191 < y < 1.2499999999999999e-113

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 62.6%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac68.5%

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

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

    if 3.50000000000000008e-201 < y < 7.7999999999999999e-191

    1. Initial program 100.0%

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

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

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

    if 1.2499999999999999e-113 < y

    1. Initial program 96.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-113}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\ \end{array} \]

Alternative 7: 76.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -6.8 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.10000000000000011e49

    1. Initial program 98.2%

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

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

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

    if -2.10000000000000011e49 < y < -1.85000000000000001e27

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 82.9%

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

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

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

    if -1.85000000000000001e27 < y < -6.7999999999999994e-20

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999994e-20 < y < 6.00000000000000004e-201 or 7.7999999999999999e-191 < y < 1.9500000000000001e-112

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 62.6%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac68.5%

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

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

    if 6.00000000000000004e-201 < y < 7.7999999999999999e-191

    1. Initial program 100.0%

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

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

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

    if 1.9500000000000001e-112 < y

    1. Initial program 96.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-112}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 8: 76.7% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq -9.6 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.10000000000000011e49

    1. Initial program 98.2%

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

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

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

    if -2.10000000000000011e49 < y < -1.85000000000000001e27

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 83.1%

      \[\leadsto -0.3333333333333333 \cdot \frac{\color{blue}{-1 \cdot \frac{t}{y}}}{z} \]
    6. Step-by-step derivation
      1. neg-mul-183.1%

        \[\leadsto -0.3333333333333333 \cdot \frac{\color{blue}{-\frac{t}{y}}}{z} \]
      2. distribute-neg-frac83.1%

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

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

    if -1.85000000000000001e27 < y < -9.59999999999999971e-20

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.59999999999999971e-20 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 7.99999999999999983e-113

    1. Initial program 89.7%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around 0 62.6%

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac68.5%

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

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

    if 6.1999999999999998e-201 < y < 7.7999999999999999e-191

    1. Initial program 100.0%

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

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

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

    if 7.99999999999999983e-113 < y

    1. Initial program 96.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{-t}{y}}{z}\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{z \cdot -3}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-113}:\\ \;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 9: 87.2% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.0000000000000005e49

    1. Initial program 98.2%

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

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

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

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

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

    if -6.0000000000000005e49 < y < -2.2499999999999999e-4

    1. Initial program 99.8%

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

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

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

    if -2.2499999999999999e-4 < y < -1.2000000000000001e-70

    1. Initial program 92.5%

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

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

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

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

    if -1.2000000000000001e-70 < y < 1.3999999999999999e76

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

    if 1.3999999999999999e76 < y

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq -0.000225:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-70}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 10: 90.6% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.0000000000000005e49

    1. Initial program 98.2%

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

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

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

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

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

    if -6.0000000000000005e49 < y < -0.71999999999999997

    1. Initial program 99.8%

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

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

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

    if -0.71999999999999997 < y < -2.20000000000000018e-53

    1. Initial program 91.3%

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

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

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

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

    if -2.20000000000000018e-53 < y < 1.3e76

    1. Initial program 91.3%

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac58.1%

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

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

    if 1.3e76 < y

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq -0.72:\\ \;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 11: 90.7% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.99999999999999965e49

    1. Initial program 98.2%

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

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

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

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

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

    if -8.99999999999999965e49 < y < -2.3e-5

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -2.3e-5 < y < -2.20000000000000018e-53

    1. Initial program 91.3%

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

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

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

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

    if -2.20000000000000018e-53 < y < 9.0000000000000007e75

    1. Initial program 91.3%

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot 0.3333333333333333}{\color{blue}{z \cdot y}} \]
      4. times-frac58.1%

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

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

    if 9.0000000000000007e75 < y

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 12: 90.2% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.20000000000000022e49

    1. Initial program 98.2%

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

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

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

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

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

    if -4.20000000000000022e49 < y < -1.9000000000000001e-5

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-5 < y < -1.2000000000000001e-70

    1. Initial program 92.5%

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

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

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

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

    if -1.2000000000000001e-70 < y < 9.0000000000000007e75

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000007e75 < y

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+49}:\\ \;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-70}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\ \end{array} \]

Alternative 13: 81.1% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e13

    1. Initial program 98.3%

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

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

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

    if -1.3e13 < z < 2.10000000000000015e69

    1. Initial program 90.2%

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

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

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

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

    if 2.10000000000000015e69 < z

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 80.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 97.5%

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

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

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

    if -1.80000000000000007e-61 < z < 6.6000000000000006e67

    1. Initial program 89.2%

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

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

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

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

    if 6.6000000000000006e67 < z

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 95.7% accurate, 1.4× speedup?

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

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

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

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

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

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

Alternative 16: 95.8% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 45.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-102}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.59999999999999973e-102 or 1.8e114 < z

    1. Initial program 96.4%

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

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

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

    if -4.59999999999999973e-102 < z < 1.8e114

    1. Initial program 91.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 42.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+114}:\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 45.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-102}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2999999999999997e-102 or 2.7e114 < z

    1. Initial program 96.4%

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

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

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

    if -4.2999999999999997e-102 < z < 2.7e114

    1. Initial program 91.5%

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}} \]
    5. Taylor expanded in y around inf 42.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+114}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 30.4% accurate, 15.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification33.2%

    \[\leadsto x \]

Developer target: 95.9% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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