Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 67.1% → 87.7%
Time: 14.5s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 67.1% accurate, 1.0× speedup?

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

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

Alternative 1: 87.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{t\_3 + y \cdot x}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;y \cdot \frac{x - a \cdot \frac{z}{y}}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\ \mathbf{elif}\;t\_4 \leq 0:\\ \;\;\;\;t\_2 - \frac{x \cdot \frac{y}{y - b} + \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{t\_1}\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ t_3 (* y x)) t_1)))
   (if (<= t_4 (- INFINITY))
     (* y (/ (- x (* a (/ z y))) (fma z (- b y) y)))
     (if (<= t_4 -5e-273)
       (/ (fma x y t_3) t_1)
       (if (<= t_4 0.0)
         (-
          t_2
          (/ (+ (* x (/ y (- y b))) (/ (* y (- t a)) (pow (- b y) 2.0))) z))
         (if (<= t_4 2e+292)
           (/ (+ (* y x) (- (* z t) (* z a))) t_1)
           (if (<= t_4 INFINITY)
             (* x (+ (/ y t_1) (/ t_3 (* x t_1))))
             t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = z * (t - a);
	double t_4 = (t_3 + (y * x)) / t_1;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = y * ((x - (a * (z / y))) / fma(z, (b - y), y));
	} else if (t_4 <= -5e-273) {
		tmp = fma(x, y, t_3) / t_1;
	} else if (t_4 <= 0.0) {
		tmp = t_2 - (((x * (y / (y - b))) + ((y * (t - a)) / pow((b - y), 2.0))) / z);
	} else if (t_4 <= 2e+292) {
		tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = x * ((y / t_1) + (t_3 / (x * t_1)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(t_3 + Float64(y * x)) / t_1)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(x - Float64(a * Float64(z / y))) / fma(z, Float64(b - y), y)));
	elseif (t_4 <= -5e-273)
		tmp = Float64(fma(x, y, t_3) / t_1);
	elseif (t_4 <= 0.0)
		tmp = Float64(t_2 - Float64(Float64(Float64(x * Float64(y / Float64(y - b))) + Float64(Float64(y * Float64(t - a)) / (Float64(b - y) ^ 2.0))) / z));
	elseif (t_4 <= 2e+292)
		tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / t_1);
	elseif (t_4 <= Inf)
		tmp = Float64(x * Float64(Float64(y / t_1) + Float64(t_3 / Float64(x * t_1))));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(y * N[(N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -5e-273], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 - N[(N[(N[(x * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+292], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$3 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t\_3 + y \cdot x}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x - a \cdot \frac{z}{y}}{\mathsf{fma}\left(z, b - y, y\right)}\\

\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-273}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\

\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2 - \frac{x \cdot \frac{y}{y - b} + \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{t\_1}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0

    1. Initial program 37.2%

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x + -1 \cdot \frac{a \cdot z}{y}}{y + z \cdot \left(b - y\right)}} \]
      2. mul-1-neg59.1%

        \[\leadsto y \cdot \frac{x + \color{blue}{\left(-\frac{a \cdot z}{y}\right)}}{y + z \cdot \left(b - y\right)} \]
      3. unsub-neg59.1%

        \[\leadsto y \cdot \frac{\color{blue}{x - \frac{a \cdot z}{y}}}{y + z \cdot \left(b - y\right)} \]
      4. associate-/l*72.5%

        \[\leadsto y \cdot \frac{x - \color{blue}{a \cdot \frac{z}{y}}}{y + z \cdot \left(b - y\right)} \]
      5. +-commutative72.5%

        \[\leadsto y \cdot \frac{x - a \cdot \frac{z}{y}}{\color{blue}{z \cdot \left(b - y\right) + y}} \]
      6. fma-undefine72.4%

        \[\leadsto y \cdot \frac{x - a \cdot \frac{z}{y}}{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}} \]
    8. Simplified72.4%

      \[\leadsto \color{blue}{y \cdot \frac{x - a \cdot \frac{z}{y}}{\mathsf{fma}\left(z, b - y, y\right)}} \]

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999965e-273

    1. Initial program 99.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define99.6%

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

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

    if -4.99999999999999965e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0

    1. Initial program 26.5%

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

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

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

      \[\leadsto \frac{x \cdot y + \color{blue}{\left(z \cdot t + z \cdot \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)} \]
    5. Taylor expanded in z around -inf 95.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{a + -1 \cdot t}{b - y} + -1 \cdot \frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg95.6%

        \[\leadsto -1 \cdot \frac{a + -1 \cdot t}{b - y} + \color{blue}{\left(-\frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z}\right)} \]
      2. unsub-neg95.6%

        \[\leadsto \color{blue}{-1 \cdot \frac{a + -1 \cdot t}{b - y} - \frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z}} \]
      3. mul-1-neg95.6%

        \[\leadsto \color{blue}{\left(-\frac{a + -1 \cdot t}{b - y}\right)} - \frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z} \]
      4. mul-1-neg95.6%

        \[\leadsto \left(-\frac{a + \color{blue}{\left(-t\right)}}{b - y}\right) - \frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z} \]
      5. unsub-neg95.6%

        \[\leadsto \left(-\frac{\color{blue}{a - t}}{b - y}\right) - \frac{-1 \cdot \frac{x \cdot y}{b - y} - \frac{y \cdot \left(a + -1 \cdot t\right)}{{\left(b - y\right)}^{2}}}{z} \]
    7. Simplified91.6%

      \[\leadsto \color{blue}{\left(-\frac{a - t}{b - y}\right) - \frac{\left(-x \cdot \frac{y}{b - y}\right) - \frac{\left(a - t\right) \cdot y}{{\left(b - y\right)}^{2}}}{z}} \]

    if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e292

    1. Initial program 99.5%

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

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

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

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

    if 2e292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 36.8%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 75.1%

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

    if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 0.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification91.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;y \cdot \frac{x - a \cdot \frac{z}{y}}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)} \leq -5 \cdot 10^{-273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)} \leq 0:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x \cdot \frac{y}{y - b} + \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)} \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)} \leq \infty:\\ \;\;\;\;x \cdot \left(\frac{y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{x \cdot \left(y + z \cdot \left(b - y\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+30} \lor \neg \left(z \leq 175000000\right):\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y)))))
   (if (or (<= z -8e+30) (not (<= z 175000000.0)))
     (+
      (+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
      (* y (/ (- a t) (* z (pow (- b y) 2.0)))))
     (* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -8e+30) || !(z <= 175000000.0)) {
		tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    if ((z <= (-8d+30)) .or. (.not. (z <= 175000000.0d0))) then
        tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ** 2.0d0))))
    else
        tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -8e+30) || !(z <= 175000000.0)) {
		tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	tmp = 0
	if (z <= -8e+30) or not (z <= 175000000.0):
		tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * math.pow((b - y), 2.0))))
	else:
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	tmp = 0.0
	if ((z <= -8e+30) || !(z <= 175000000.0))
		tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0)))));
	else
		tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	tmp = 0.0;
	if ((z <= -8e+30) || ~((z <= 175000000.0)))
		tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ^ 2.0))));
	else
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -8e+30], N[Not[LessEqual[z, 175000000.0]], $MachinePrecision]], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+30} \lor \neg \left(z \leq 175000000\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.0000000000000002e30 or 1.75e8 < z

    1. Initial program 49.0%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.8%

      \[\leadsto \color{blue}{\left(\frac{t}{b - y} + \frac{x \cdot y}{z \cdot \left(b - y\right)}\right) - \left(\frac{a}{b - y} + \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}}\right)} \]
    4. Step-by-step derivation
      1. associate--r+70.8%

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

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

        \[\leadsto \color{blue}{\left(\frac{x \cdot y}{z \cdot \left(b - y\right)} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right)\right)} - \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} \]
      4. *-commutative70.8%

        \[\leadsto \left(\frac{\color{blue}{y \cdot x}}{z \cdot \left(b - y\right)} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right)\right) - \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} \]
      5. times-frac76.8%

        \[\leadsto \left(\color{blue}{\frac{y}{z} \cdot \frac{x}{b - y}} + \left(\frac{t}{b - y} - \frac{a}{b - y}\right)\right) - \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} \]
      6. div-sub77.7%

        \[\leadsto \left(\frac{y}{z} \cdot \frac{x}{b - y} + \color{blue}{\frac{t - a}{b - y}}\right) - \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} \]
      7. associate-/l*91.2%

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

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

    if -8.0000000000000002e30 < z < 1.75e8

    1. Initial program 86.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 88.7%

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

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

Alternative 3: 85.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+51} \lor \neg \left(z \leq 2.4 \cdot 10^{+41}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y)))))
   (if (or (<= z -3.1e+51) (not (<= z 2.4e+41)))
     (/ (- t a) (- b y))
     (* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -3.1e+51) || !(z <= 2.4e+41)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    if ((z <= (-3.1d+51)) .or. (.not. (z <= 2.4d+41))) then
        tmp = (t - a) / (b - y)
    else
        tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if ((z <= -3.1e+51) || !(z <= 2.4e+41)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	tmp = 0
	if (z <= -3.1e+51) or not (z <= 2.4e+41):
		tmp = (t - a) / (b - y)
	else:
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	tmp = 0.0
	if ((z <= -3.1e+51) || !(z <= 2.4e+41))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	else
		tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	tmp = 0.0;
	if ((z <= -3.1e+51) || ~((z <= 2.4e+41)))
		tmp = (t - a) / (b - y);
	else
		tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -3.1e+51], N[Not[LessEqual[z, 2.4e+41]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+51} \lor \neg \left(z \leq 2.4 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.10000000000000011e51 or 2.4000000000000002e41 < z

    1. Initial program 44.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.0%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -3.10000000000000011e51 < z < 2.4000000000000002e41

    1. Initial program 86.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+51} \lor \neg \left(z \leq 2.4 \cdot 10^{+41}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{x \cdot \left(y + z \cdot \left(b - y\right)\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 85.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+56} \lor \neg \left(z \leq 6 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.40000000000000019e56 or 5.9999999999999997e41 < z

    1. Initial program 44.1%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.0%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -5.40000000000000019e56 < z < 5.9999999999999997e41

    1. Initial program 86.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification85.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+56} \lor \neg \left(z \leq 6 \cdot 10^{+41}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+33} \lor \neg \left(z \leq 7.5 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.9999999999999995e32 or 7.4999999999999996e40 < z

    1. Initial program 45.3%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.6%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -9.9999999999999995e32 < z < 7.4999999999999996e40

    1. Initial program 86.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 83.9%

      \[\leadsto \frac{x \cdot y + z \cdot \left(t - a\right)}{y + \color{blue}{b \cdot z}} \]
    4. Step-by-step derivation
      1. *-commutative83.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+33} \lor \neg \left(z \leq 7.5 \cdot 10^{+40}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-12} \lor \neg \left(z \leq 1.25 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.99999999999999992e-12 or 1.2500000000000001e-16 < z

    1. Initial program 52.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -3.99999999999999992e-12 < z < 1.2500000000000001e-16

    1. Initial program 85.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define85.6%

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{a \cdot z}{y} + \frac{t \cdot z}{y}\right)} \]
    8. Step-by-step derivation
      1. associate-+r+71.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-12} \lor \neg \left(z \leq 1.25 \cdot 10^{-16}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{z \cdot a}{y}\right) + t \cdot \frac{z}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-12} \lor \neg \left(z \leq 4 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.79999999999999996e-12 or 3.9999999999999999e-16 < z

    1. Initial program 52.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -3.79999999999999996e-12 < z < 3.9999999999999999e-16

    1. Initial program 85.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define85.6%

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{a \cdot z}{y}} \]
    8. Step-by-step derivation
      1. mul-1-neg62.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-12} \lor \neg \left(z \leq 4 \cdot 10^{-16}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot a}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0003 \lor \neg \left(y \leq 3.9 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999974e-4 or 3.90000000000000021e-50 < y

    1. Initial program 54.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 57.5%

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-neg57.5%

        \[\leadsto \frac{x}{1 + \color{blue}{\left(-z\right)}} \]
      2. unsub-neg57.5%

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    5. Simplified57.5%

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

    if -2.99999999999999974e-4 < y < 3.90000000000000021e-50

    1. Initial program 82.4%

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

      \[\leadsto \color{blue}{\frac{t - a}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0003 \lor \neg \left(y \leq 3.9 \cdot 10^{-50}\right):\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 43.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-10} \lor \neg \left(y \leq 4.1 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3e-10 or 4.09999999999999985e-50 < y

    1. Initial program 54.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 57.5%

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-neg57.5%

        \[\leadsto \frac{x}{1 + \color{blue}{\left(-z\right)}} \]
      2. unsub-neg57.5%

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    5. Simplified57.5%

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

    if -3e-10 < y < 4.09999999999999985e-50

    1. Initial program 82.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 68.6%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
    4. Taylor expanded in t around inf 32.3%

      \[\leadsto \color{blue}{\frac{t}{b - y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.6%

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

Alternative 10: 45.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-27} \lor \neg \left(z \leq 4.5 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05000000000000008e-27 or 4.49999999999999978e-17 < z

    1. Initial program 53.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.4%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
    4. Taylor expanded in t around inf 36.3%

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

    if -1.05000000000000008e-27 < z < 4.49999999999999978e-17

    1. Initial program 85.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-27} \lor \neg \left(z \leq 4.5 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 34.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -360000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\


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

    1. Initial program 53.8%

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

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

    if -3.6e11 < y < 2.9999999999999999e-50

    1. Initial program 82.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define82.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{b}} \]

    if 2.9999999999999999e-50 < y

    1. Initial program 55.4%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 48.6%

      \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-neg48.6%

        \[\leadsto \frac{x}{1 + \color{blue}{\left(-z\right)}} \]
      2. unsub-neg48.6%

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    5. Simplified48.6%

      \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
    6. Taylor expanded in z around 0 33.6%

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

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

Alternative 12: 34.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -480000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8e11 or 4.09999999999999985e-50 < y

    1. Initial program 54.6%

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

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

    if -4.8e11 < y < 4.09999999999999985e-50

    1. Initial program 82.6%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define82.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 25.6% accurate, 17.0× speedup?

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

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

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

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

Developer Target 1: 74.7% accurate, 0.7× speedup?

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

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

Reproduce

?
herbie shell --seed 2024170 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

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

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))