Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.9% → 89.7%
Time: 26.9s
Alternatives: 16
Speedup: 1.3×

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 16 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: 65.9% 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: 89.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := \mathsf{fma}\left(z, b - y, y\right)\\ \mathbf{if}\;z \leq -7600:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-268}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_3}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-100}:\\ \;\;\;\;\frac{y}{\frac{t_3}{x}} + z \cdot \frac{t}{t_3}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{t_2 + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ 1.0 (* (/ (- b y) y) (/ z x))) (/ (- t a) (- b y))))
        (t_2 (* z (- t a)))
        (t_3 (fma z (- b y) y)))
   (if (<= z -7600.0)
     t_1
     (if (<= z 7e-268)
       (/ (fma x y t_2) t_3)
       (if (<= z 3.9e-100)
         (+ (/ y (/ t_3 x)) (* z (/ t t_3)))
         (if (<= z 1.2e+14) (/ (+ t_2 (* y x)) (+ y (* z (- b y)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_2 = z * (t - a);
	double t_3 = fma(z, (b - y), y);
	double tmp;
	if (z <= -7600.0) {
		tmp = t_1;
	} else if (z <= 7e-268) {
		tmp = fma(x, y, t_2) / t_3;
	} else if (z <= 3.9e-100) {
		tmp = (y / (t_3 / x)) + (z * (t / t_3));
	} else if (z <= 1.2e+14) {
		tmp = (t_2 + (y * x)) / (y + (z * (b - y)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(1.0 / Float64(Float64(Float64(b - y) / y) * Float64(z / x))) + Float64(Float64(t - a) / Float64(b - y)))
	t_2 = Float64(z * Float64(t - a))
	t_3 = fma(z, Float64(b - y), y)
	tmp = 0.0
	if (z <= -7600.0)
		tmp = t_1;
	elseif (z <= 7e-268)
		tmp = Float64(fma(x, y, t_2) / t_3);
	elseif (z <= 3.9e-100)
		tmp = Float64(Float64(y / Float64(t_3 / x)) + Float64(z * Float64(t / t_3)));
	elseif (z <= 1.2e+14)
		tmp = Float64(Float64(t_2 + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 / N[(N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[z, -7600.0], t$95$1, If[LessEqual[z, 7e-268], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[z, 3.9e-100], N[(N[(y / N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(t / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+14], N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7 \cdot 10^{-268}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_3}\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-100}:\\
\;\;\;\;\frac{y}{\frac{t_3}{x}} + z \cdot \frac{t}{t_3}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{t_2 + y \cdot x}{y + z \cdot \left(b - y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7600 or 1.2e14 < z

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]
    9. Simplified99.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]

    if -7600 < z < 7.00000000000000011e-268

    1. Initial program 94.8%

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

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

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

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

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

    if 7.00000000000000011e-268 < z < 3.89999999999999977e-100

    1. Initial program 68.7%

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{x}} + \frac{t \cdot z}{y + \left(b - y\right) \cdot z} \]
      5. associate-/l*87.6%

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

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

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

        \[\leadsto \frac{y}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{x}} + \frac{t}{\frac{\color{blue}{\mathsf{fma}\left(z, b - y, y\right)}}{z}} \]
      9. associate-/r/87.7%

        \[\leadsto \frac{y}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{x}} + \color{blue}{\frac{t}{\mathsf{fma}\left(z, b - y, y\right)} \cdot z} \]
    5. Simplified87.7%

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

    if 3.89999999999999977e-100 < z < 1.2e14

    1. Initial program 92.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7600:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-268}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-100}:\\ \;\;\;\;\frac{y}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{x}} + z \cdot \frac{t}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 2: 92.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -7200:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-291}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, t_3\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_3}{t_1}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{t_3 + y \cdot x}{t_1}\\ \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 (+ (/ 1.0 (* (/ (- b y) y) (/ z x))) (/ (- t a) (- b y))))
        (t_3 (* z (- t a))))
   (if (<= z -7200.0)
     t_2
     (if (<= z 8e-291)
       (/ (fma x y t_3) (fma z (- b y) y))
       (if (<= z 1.3e-101)
         (+ x (/ t_3 t_1))
         (if (<= z 1.2e+14) (/ (+ t_3 (* y 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 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_3 = z * (t - a);
	double tmp;
	if (z <= -7200.0) {
		tmp = t_2;
	} else if (z <= 8e-291) {
		tmp = fma(x, y, t_3) / fma(z, (b - y), y);
	} else if (z <= 1.3e-101) {
		tmp = x + (t_3 / t_1);
	} else if (z <= 1.2e+14) {
		tmp = (t_3 + (y * 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(1.0 / Float64(Float64(Float64(b - y) / y) * Float64(z / x))) + Float64(Float64(t - a) / Float64(b - y)))
	t_3 = Float64(z * Float64(t - a))
	tmp = 0.0
	if (z <= -7200.0)
		tmp = t_2;
	elseif (z <= 8e-291)
		tmp = Float64(fma(x, y, t_3) / fma(z, Float64(b - y), y));
	elseif (z <= 1.3e-101)
		tmp = Float64(x + Float64(t_3 / t_1));
	elseif (z <= 1.2e+14)
		tmp = Float64(Float64(t_3 + Float64(y * 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[(1.0 / N[(N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7200.0], t$95$2, If[LessEqual[z, 8e-291], N[(N[(x * y + t$95$3), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-101], N[(x + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+14], N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -7200:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-291}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_3\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_3}{t_1}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{t_3 + y \cdot x}{t_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7200 or 1.2e14 < z

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]
    9. Simplified99.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]

    if -7200 < z < 7.9999999999999997e-291

    1. Initial program 93.8%

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

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

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

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

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

    if 7.9999999999999997e-291 < z < 1.3000000000000001e-101

    1. Initial program 79.1%

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

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

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

    if 1.3000000000000001e-101 < z < 1.2e14

    1. Initial program 88.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7200:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-291}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 3: 92.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := y + z \cdot \left(b - y\right)\\ t_4 := \frac{t_2}{t_3}\\ \mathbf{if}\;z \leq -7600:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-291}:\\ \;\;\;\;t_4 + \frac{y \cdot x}{t_3}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\ \;\;\;\;x + t_4\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{t_2 + y \cdot x}{t_3}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ 1.0 (* (/ (- b y) y) (/ z x))) (/ (- t a) (- b y))))
        (t_2 (* z (- t a)))
        (t_3 (+ y (* z (- b y))))
        (t_4 (/ t_2 t_3)))
   (if (<= z -7600.0)
     t_1
     (if (<= z 7.4e-291)
       (+ t_4 (/ (* y x) t_3))
       (if (<= z 9.2e-101)
         (+ x t_4)
         (if (<= z 1.2e+14) (/ (+ t_2 (* y x)) t_3) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_2 = z * (t - a);
	double t_3 = y + (z * (b - y));
	double t_4 = t_2 / t_3;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_1;
	} else if (z <= 7.4e-291) {
		tmp = t_4 + ((y * x) / t_3);
	} else if (z <= 9.2e-101) {
		tmp = x + t_4;
	} else if (z <= 1.2e+14) {
		tmp = (t_2 + (y * x)) / t_3;
	} else {
		tmp = 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (1.0d0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y))
    t_2 = z * (t - a)
    t_3 = y + (z * (b - y))
    t_4 = t_2 / t_3
    if (z <= (-7600.0d0)) then
        tmp = t_1
    else if (z <= 7.4d-291) then
        tmp = t_4 + ((y * x) / t_3)
    else if (z <= 9.2d-101) then
        tmp = x + t_4
    else if (z <= 1.2d+14) then
        tmp = (t_2 + (y * x)) / t_3
    else
        tmp = 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 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_2 = z * (t - a);
	double t_3 = y + (z * (b - y));
	double t_4 = t_2 / t_3;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_1;
	} else if (z <= 7.4e-291) {
		tmp = t_4 + ((y * x) / t_3);
	} else if (z <= 9.2e-101) {
		tmp = x + t_4;
	} else if (z <= 1.2e+14) {
		tmp = (t_2 + (y * x)) / t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y))
	t_2 = z * (t - a)
	t_3 = y + (z * (b - y))
	t_4 = t_2 / t_3
	tmp = 0
	if z <= -7600.0:
		tmp = t_1
	elif z <= 7.4e-291:
		tmp = t_4 + ((y * x) / t_3)
	elif z <= 9.2e-101:
		tmp = x + t_4
	elif z <= 1.2e+14:
		tmp = (t_2 + (y * x)) / t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(1.0 / Float64(Float64(Float64(b - y) / y) * Float64(z / x))) + Float64(Float64(t - a) / Float64(b - y)))
	t_2 = Float64(z * Float64(t - a))
	t_3 = Float64(y + Float64(z * Float64(b - y)))
	t_4 = Float64(t_2 / t_3)
	tmp = 0.0
	if (z <= -7600.0)
		tmp = t_1;
	elseif (z <= 7.4e-291)
		tmp = Float64(t_4 + Float64(Float64(y * x) / t_3));
	elseif (z <= 9.2e-101)
		tmp = Float64(x + t_4);
	elseif (z <= 1.2e+14)
		tmp = Float64(Float64(t_2 + Float64(y * x)) / t_3);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	t_2 = z * (t - a);
	t_3 = y + (z * (b - y));
	t_4 = t_2 / t_3;
	tmp = 0.0;
	if (z <= -7600.0)
		tmp = t_1;
	elseif (z <= 7.4e-291)
		tmp = t_4 + ((y * x) / t_3);
	elseif (z <= 9.2e-101)
		tmp = x + t_4;
	elseif (z <= 1.2e+14)
		tmp = (t_2 + (y * x)) / t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 / N[(N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$3), $MachinePrecision]}, If[LessEqual[z, -7600.0], t$95$1, If[LessEqual[z, 7.4e-291], N[(t$95$4 + N[(N[(y * x), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-101], N[(x + t$95$4), $MachinePrecision], If[LessEqual[z, 1.2e+14], N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := y + z \cdot \left(b - y\right)\\
t_4 := \frac{t_2}{t_3}\\
\mathbf{if}\;z \leq -7600:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-291}:\\
\;\;\;\;t_4 + \frac{y \cdot x}{t_3}\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;x + t_4\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{t_2 + y \cdot x}{t_3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7600 or 1.2e14 < z

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]
    9. Simplified99.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]

    if -7600 < z < 7.4000000000000001e-291

    1. Initial program 93.8%

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

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

    if 7.4000000000000001e-291 < z < 9.1999999999999998e-101

    1. Initial program 79.1%

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

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

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

    if 9.1999999999999998e-101 < z < 1.2e14

    1. Initial program 88.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7600:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-291}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} + \frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 4: 92.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ t_2 := z \cdot \left(t - a\right)\\ t_3 := y + z \cdot \left(b - y\right)\\ t_4 := \frac{t_2 + y \cdot x}{t_3}\\ \mathbf{if}\;z \leq -7600:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-291}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_2}{t_3}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+14}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ 1.0 (* (/ (- b y) y) (/ z x))) (/ (- t a) (- b y))))
        (t_2 (* z (- t a)))
        (t_3 (+ y (* z (- b y))))
        (t_4 (/ (+ t_2 (* y x)) t_3)))
   (if (<= z -7600.0)
     t_1
     (if (<= z 5.4e-291)
       t_4
       (if (<= z 1.6e-101) (+ x (/ t_2 t_3)) (if (<= z 3.4e+14) t_4 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_2 = z * (t - a);
	double t_3 = y + (z * (b - y));
	double t_4 = (t_2 + (y * x)) / t_3;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_1;
	} else if (z <= 5.4e-291) {
		tmp = t_4;
	} else if (z <= 1.6e-101) {
		tmp = x + (t_2 / t_3);
	} else if (z <= 3.4e+14) {
		tmp = t_4;
	} else {
		tmp = 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (1.0d0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y))
    t_2 = z * (t - a)
    t_3 = y + (z * (b - y))
    t_4 = (t_2 + (y * x)) / t_3
    if (z <= (-7600.0d0)) then
        tmp = t_1
    else if (z <= 5.4d-291) then
        tmp = t_4
    else if (z <= 1.6d-101) then
        tmp = x + (t_2 / t_3)
    else if (z <= 3.4d+14) then
        tmp = t_4
    else
        tmp = 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 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	double t_2 = z * (t - a);
	double t_3 = y + (z * (b - y));
	double t_4 = (t_2 + (y * x)) / t_3;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_1;
	} else if (z <= 5.4e-291) {
		tmp = t_4;
	} else if (z <= 1.6e-101) {
		tmp = x + (t_2 / t_3);
	} else if (z <= 3.4e+14) {
		tmp = t_4;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y))
	t_2 = z * (t - a)
	t_3 = y + (z * (b - y))
	t_4 = (t_2 + (y * x)) / t_3
	tmp = 0
	if z <= -7600.0:
		tmp = t_1
	elif z <= 5.4e-291:
		tmp = t_4
	elif z <= 1.6e-101:
		tmp = x + (t_2 / t_3)
	elif z <= 3.4e+14:
		tmp = t_4
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(1.0 / Float64(Float64(Float64(b - y) / y) * Float64(z / x))) + Float64(Float64(t - a) / Float64(b - y)))
	t_2 = Float64(z * Float64(t - a))
	t_3 = Float64(y + Float64(z * Float64(b - y)))
	t_4 = Float64(Float64(t_2 + Float64(y * x)) / t_3)
	tmp = 0.0
	if (z <= -7600.0)
		tmp = t_1;
	elseif (z <= 5.4e-291)
		tmp = t_4;
	elseif (z <= 1.6e-101)
		tmp = Float64(x + Float64(t_2 / t_3));
	elseif (z <= 3.4e+14)
		tmp = t_4;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (1.0 / (((b - y) / y) * (z / x))) + ((t - a) / (b - y));
	t_2 = z * (t - a);
	t_3 = y + (z * (b - y));
	t_4 = (t_2 + (y * x)) / t_3;
	tmp = 0.0;
	if (z <= -7600.0)
		tmp = t_1;
	elseif (z <= 5.4e-291)
		tmp = t_4;
	elseif (z <= 1.6e-101)
		tmp = x + (t_2 / t_3);
	elseif (z <= 3.4e+14)
		tmp = t_4;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 / N[(N[(N[(b - y), $MachinePrecision] / y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[z, -7600.0], t$95$1, If[LessEqual[z, 5.4e-291], t$95$4, If[LessEqual[z, 1.6e-101], N[(x + N[(t$95$2 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+14], t$95$4, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := y + z \cdot \left(b - y\right)\\
t_4 := \frac{t_2 + y \cdot x}{t_3}\\
\mathbf{if}\;z \leq -7600:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-291}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_2}{t_3}\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+14}:\\
\;\;\;\;t_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7600 or 3.4e14 < z

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]
    9. Simplified99.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}}} + \frac{t - a}{b - y} \]

    if -7600 < z < 5.39999999999999983e-291 or 1.59999999999999989e-101 < z < 3.4e14

    1. Initial program 92.3%

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

    if 5.39999999999999983e-291 < z < 1.59999999999999989e-101

    1. Initial program 79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7600:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-291}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+14}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{b - y}{y} \cdot \frac{z}{x}} + \frac{t - a}{b - y}\\ \end{array} \]

Alternative 5: 84.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y} + \frac{y \cdot x}{t_1}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{t_3 + y \cdot x}{y + z \cdot b}\\ \mathbf{if}\;z \leq -0.62:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-290}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_3}{y + t_1}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- b y)))
        (t_2 (+ (/ (- t a) (- b y)) (/ (* y x) t_1)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ t_3 (* y x)) (+ y (* z b)))))
   (if (<= z -0.62)
     t_2
     (if (<= z 1.16e-290)
       t_4
       (if (<= z 9.2e-101) (+ x (/ t_3 (+ y t_1))) (if (<= z 1.0) t_4 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (b - y);
	double t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	double t_3 = z * (t - a);
	double t_4 = (t_3 + (y * x)) / (y + (z * b));
	double tmp;
	if (z <= -0.62) {
		tmp = t_2;
	} else if (z <= 1.16e-290) {
		tmp = t_4;
	} else if (z <= 9.2e-101) {
		tmp = x + (t_3 / (y + t_1));
	} else if (z <= 1.0) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = z * (b - y)
    t_2 = ((t - a) / (b - y)) + ((y * x) / t_1)
    t_3 = z * (t - a)
    t_4 = (t_3 + (y * x)) / (y + (z * b))
    if (z <= (-0.62d0)) then
        tmp = t_2
    else if (z <= 1.16d-290) then
        tmp = t_4
    else if (z <= 9.2d-101) then
        tmp = x + (t_3 / (y + t_1))
    else if (z <= 1.0d0) then
        tmp = t_4
    else
        tmp = t_2
    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 = z * (b - y);
	double t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	double t_3 = z * (t - a);
	double t_4 = (t_3 + (y * x)) / (y + (z * b));
	double tmp;
	if (z <= -0.62) {
		tmp = t_2;
	} else if (z <= 1.16e-290) {
		tmp = t_4;
	} else if (z <= 9.2e-101) {
		tmp = x + (t_3 / (y + t_1));
	} else if (z <= 1.0) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (b - y)
	t_2 = ((t - a) / (b - y)) + ((y * x) / t_1)
	t_3 = z * (t - a)
	t_4 = (t_3 + (y * x)) / (y + (z * b))
	tmp = 0
	if z <= -0.62:
		tmp = t_2
	elif z <= 1.16e-290:
		tmp = t_4
	elif z <= 9.2e-101:
		tmp = x + (t_3 / (y + t_1))
	elif z <= 1.0:
		tmp = t_4
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(b - y))
	t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y * x) / t_1))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(t_3 + Float64(y * x)) / Float64(y + Float64(z * b)))
	tmp = 0.0
	if (z <= -0.62)
		tmp = t_2;
	elseif (z <= 1.16e-290)
		tmp = t_4;
	elseif (z <= 9.2e-101)
		tmp = Float64(x + Float64(t_3 / Float64(y + t_1)));
	elseif (z <= 1.0)
		tmp = t_4;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (b - y);
	t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	t_3 = z * (t - a);
	t_4 = (t_3 + (y * x)) / (y + (z * b));
	tmp = 0.0;
	if (z <= -0.62)
		tmp = t_2;
	elseif (z <= 1.16e-290)
		tmp = t_4;
	elseif (z <= 9.2e-101)
		tmp = x + (t_3 / (y + t_1));
	elseif (z <= 1.0)
		tmp = t_4;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$1), $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] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.62], t$95$2, If[LessEqual[z, 1.16e-290], t$95$4, If[LessEqual[z, 9.2e-101], N[(x + N[(t$95$3 / N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$4, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y} + \frac{y \cdot x}{t_1}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t_3 + y \cdot x}{y + z \cdot b}\\
\mathbf{if}\;z \leq -0.62:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.16 \cdot 10^{-290}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_3}{y + t_1}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_4\\

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


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

    1. Initial program 42.1%

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

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

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

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

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

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

    if -0.619999999999999996 < z < 1.16000000000000001e-290 or 9.1999999999999998e-101 < z < 1

    1. Initial program 92.1%

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

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

    if 1.16000000000000001e-290 < z < 9.1999999999999998e-101

    1. Initial program 79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.62:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{y \cdot x}{z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-290}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{y \cdot x}{z \cdot \left(b - y\right)}\\ \end{array} \]

Alternative 6: 84.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y} + \frac{y \cdot x}{t_1}\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := y + t_1\\ t_5 := \frac{t_3 + y \cdot x}{t_4}\\ \mathbf{if}\;z \leq -7600:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-290}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_3}{t_4}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+14}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- b y)))
        (t_2 (+ (/ (- t a) (- b y)) (/ (* y x) t_1)))
        (t_3 (* z (- t a)))
        (t_4 (+ y t_1))
        (t_5 (/ (+ t_3 (* y x)) t_4)))
   (if (<= z -7600.0)
     t_2
     (if (<= z 1.3e-290)
       t_5
       (if (<= z 1.06e-101) (+ x (/ t_3 t_4)) (if (<= z 5.5e+14) t_5 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (b - y);
	double t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	double t_3 = z * (t - a);
	double t_4 = y + t_1;
	double t_5 = (t_3 + (y * x)) / t_4;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_2;
	} else if (z <= 1.3e-290) {
		tmp = t_5;
	} else if (z <= 1.06e-101) {
		tmp = x + (t_3 / t_4);
	} else if (z <= 5.5e+14) {
		tmp = t_5;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = z * (b - y)
    t_2 = ((t - a) / (b - y)) + ((y * x) / t_1)
    t_3 = z * (t - a)
    t_4 = y + t_1
    t_5 = (t_3 + (y * x)) / t_4
    if (z <= (-7600.0d0)) then
        tmp = t_2
    else if (z <= 1.3d-290) then
        tmp = t_5
    else if (z <= 1.06d-101) then
        tmp = x + (t_3 / t_4)
    else if (z <= 5.5d+14) then
        tmp = t_5
    else
        tmp = t_2
    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 = z * (b - y);
	double t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	double t_3 = z * (t - a);
	double t_4 = y + t_1;
	double t_5 = (t_3 + (y * x)) / t_4;
	double tmp;
	if (z <= -7600.0) {
		tmp = t_2;
	} else if (z <= 1.3e-290) {
		tmp = t_5;
	} else if (z <= 1.06e-101) {
		tmp = x + (t_3 / t_4);
	} else if (z <= 5.5e+14) {
		tmp = t_5;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (b - y)
	t_2 = ((t - a) / (b - y)) + ((y * x) / t_1)
	t_3 = z * (t - a)
	t_4 = y + t_1
	t_5 = (t_3 + (y * x)) / t_4
	tmp = 0
	if z <= -7600.0:
		tmp = t_2
	elif z <= 1.3e-290:
		tmp = t_5
	elif z <= 1.06e-101:
		tmp = x + (t_3 / t_4)
	elif z <= 5.5e+14:
		tmp = t_5
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(b - y))
	t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y * x) / t_1))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(y + t_1)
	t_5 = Float64(Float64(t_3 + Float64(y * x)) / t_4)
	tmp = 0.0
	if (z <= -7600.0)
		tmp = t_2;
	elseif (z <= 1.3e-290)
		tmp = t_5;
	elseif (z <= 1.06e-101)
		tmp = Float64(x + Float64(t_3 / t_4));
	elseif (z <= 5.5e+14)
		tmp = t_5;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (b - y);
	t_2 = ((t - a) / (b - y)) + ((y * x) / t_1);
	t_3 = z * (t - a);
	t_4 = y + t_1;
	t_5 = (t_3 + (y * x)) / t_4;
	tmp = 0.0;
	if (z <= -7600.0)
		tmp = t_2;
	elseif (z <= 1.3e-290)
		tmp = t_5;
	elseif (z <= 1.06e-101)
		tmp = x + (t_3 / t_4);
	elseif (z <= 5.5e+14)
		tmp = t_5;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]}, If[LessEqual[z, -7600.0], t$95$2, If[LessEqual[z, 1.3e-290], t$95$5, If[LessEqual[z, 1.06e-101], N[(x + N[(t$95$3 / t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+14], t$95$5, t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y} + \frac{y \cdot x}{t_1}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := y + t_1\\
t_5 := \frac{t_3 + y \cdot x}{t_4}\\
\mathbf{if}\;z \leq -7600:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-290}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_3}{t_4}\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+14}:\\
\;\;\;\;t_5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7600 or 5.5e14 < z

    1. Initial program 40.7%

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

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

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

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

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

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

    if -7600 < z < 1.3e-290 or 1.0600000000000001e-101 < z < 5.5e14

    1. Initial program 92.3%

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

    if 1.3e-290 < z < 1.0600000000000001e-101

    1. Initial program 79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7600:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{y \cdot x}{z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-290}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+14}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} + \frac{y \cdot x}{z \cdot \left(b - y\right)}\\ \end{array} \]

Alternative 7: 82.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := \frac{t_1 + y \cdot x}{y + z \cdot b}\\ t_3 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -4.2:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{t_1}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 6000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a)))
        (t_2 (/ (+ t_1 (* y x)) (+ y (* z b))))
        (t_3 (/ (- t a) (- b y))))
   (if (<= z -4.2)
     t_3
     (if (<= z 2.1e-290)
       t_2
       (if (<= z 2.45e-101)
         (+ x (/ t_1 (+ y (* z (- b y)))))
         (if (<= z 6000000.0) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = (t_1 + (y * x)) / (y + (z * b));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -4.2) {
		tmp = t_3;
	} else if (z <= 2.1e-290) {
		tmp = t_2;
	} else if (z <= 2.45e-101) {
		tmp = x + (t_1 / (y + (z * (b - y))));
	} else if (z <= 6000000.0) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z * (t - a)
    t_2 = (t_1 + (y * x)) / (y + (z * b))
    t_3 = (t - a) / (b - y)
    if (z <= (-4.2d0)) then
        tmp = t_3
    else if (z <= 2.1d-290) then
        tmp = t_2
    else if (z <= 2.45d-101) then
        tmp = x + (t_1 / (y + (z * (b - y))))
    else if (z <= 6000000.0d0) then
        tmp = t_2
    else
        tmp = t_3
    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 = z * (t - a);
	double t_2 = (t_1 + (y * x)) / (y + (z * b));
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -4.2) {
		tmp = t_3;
	} else if (z <= 2.1e-290) {
		tmp = t_2;
	} else if (z <= 2.45e-101) {
		tmp = x + (t_1 / (y + (z * (b - y))));
	} else if (z <= 6000000.0) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = (t_1 + (y * x)) / (y + (z * b))
	t_3 = (t - a) / (b - y)
	tmp = 0
	if z <= -4.2:
		tmp = t_3
	elif z <= 2.1e-290:
		tmp = t_2
	elif z <= 2.45e-101:
		tmp = x + (t_1 / (y + (z * (b - y))))
	elif z <= 6000000.0:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(Float64(t_1 + Float64(y * x)) / Float64(y + Float64(z * b)))
	t_3 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -4.2)
		tmp = t_3;
	elseif (z <= 2.1e-290)
		tmp = t_2;
	elseif (z <= 2.45e-101)
		tmp = Float64(x + Float64(t_1 / Float64(y + Float64(z * Float64(b - y)))));
	elseif (z <= 6000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (t - a);
	t_2 = (t_1 + (y * x)) / (y + (z * b));
	t_3 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -4.2)
		tmp = t_3;
	elseif (z <= 2.1e-290)
		tmp = t_2;
	elseif (z <= 2.45e-101)
		tmp = x + (t_1 / (y + (z * (b - y))));
	elseif (z <= 6000000.0)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2], t$95$3, If[LessEqual[z, 2.1e-290], t$95$2, If[LessEqual[z, 2.45e-101], N[(x + N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6000000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1 + y \cdot x}{y + z \cdot b}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.2:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-290}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-101}:\\
\;\;\;\;x + \frac{t_1}{y + z \cdot \left(b - y\right)}\\

\mathbf{elif}\;z \leq 6000000:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.20000000000000018 or 6e6 < z

    1. Initial program 42.1%

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

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

    if -4.20000000000000018 < z < 2.1000000000000001e-290 or 2.45e-101 < z < 6e6

    1. Initial program 92.1%

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

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

    if 2.1000000000000001e-290 < z < 2.45e-101

    1. Initial program 79.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-290}:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-101}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 6000000:\\ \;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]

Alternative 8: 80.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -44 or 1.2e14 < z

    1. Initial program 40.7%

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

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

    if -44 < z < 1.2e14

    1. Initial program 88.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -44 \lor \neg \left(z \leq 1.2 \cdot 10^{+14}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \end{array} \]

Alternative 9: 43.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{b - y}\\ t_2 := \frac{-a}{b}\\ t_3 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -2.9 \cdot 10^{+77}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-51}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ t (- b y))) (t_2 (/ (- a) b)) (t_3 (/ x (- 1.0 z))))
   (if (<= y -2.9e+77)
     t_3
     (if (<= y -2.9e-212)
       t_1
       (if (<= y 1.4e-281)
         t_2
         (if (<= y 1.55e-230) t_1 (if (<= y 1.05e-51) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t / (b - y);
	double t_2 = -a / b;
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -2.9e+77) {
		tmp = t_3;
	} else if (y <= -2.9e-212) {
		tmp = t_1;
	} else if (y <= 1.4e-281) {
		tmp = t_2;
	} else if (y <= 1.55e-230) {
		tmp = t_1;
	} else if (y <= 1.05e-51) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t / (b - y)
    t_2 = -a / b
    t_3 = x / (1.0d0 - z)
    if (y <= (-2.9d+77)) then
        tmp = t_3
    else if (y <= (-2.9d-212)) then
        tmp = t_1
    else if (y <= 1.4d-281) then
        tmp = t_2
    else if (y <= 1.55d-230) then
        tmp = t_1
    else if (y <= 1.05d-51) then
        tmp = t_2
    else
        tmp = t_3
    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 = t / (b - y);
	double t_2 = -a / b;
	double t_3 = x / (1.0 - z);
	double tmp;
	if (y <= -2.9e+77) {
		tmp = t_3;
	} else if (y <= -2.9e-212) {
		tmp = t_1;
	} else if (y <= 1.4e-281) {
		tmp = t_2;
	} else if (y <= 1.55e-230) {
		tmp = t_1;
	} else if (y <= 1.05e-51) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t / (b - y)
	t_2 = -a / b
	t_3 = x / (1.0 - z)
	tmp = 0
	if y <= -2.9e+77:
		tmp = t_3
	elif y <= -2.9e-212:
		tmp = t_1
	elif y <= 1.4e-281:
		tmp = t_2
	elif y <= 1.55e-230:
		tmp = t_1
	elif y <= 1.05e-51:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t / Float64(b - y))
	t_2 = Float64(Float64(-a) / b)
	t_3 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -2.9e+77)
		tmp = t_3;
	elseif (y <= -2.9e-212)
		tmp = t_1;
	elseif (y <= 1.4e-281)
		tmp = t_2;
	elseif (y <= 1.55e-230)
		tmp = t_1;
	elseif (y <= 1.05e-51)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t / (b - y);
	t_2 = -a / b;
	t_3 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -2.9e+77)
		tmp = t_3;
	elseif (y <= -2.9e-212)
		tmp = t_1;
	elseif (y <= 1.4e-281)
		tmp = t_2;
	elseif (y <= 1.55e-230)
		tmp = t_1;
	elseif (y <= 1.05e-51)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-a) / b), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+77], t$95$3, If[LessEqual[y, -2.9e-212], t$95$1, If[LessEqual[y, 1.4e-281], t$95$2, If[LessEqual[y, 1.55e-230], t$95$1, If[LessEqual[y, 1.05e-51], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{-a}{b}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+77}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -2.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-230}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-51}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.9000000000000002e77 or 1.05000000000000001e-51 < y

    1. Initial program 52.1%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 + -1 \cdot z}} \]
      2. mul-1-neg47.6%

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

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

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

    if -2.9000000000000002e77 < y < -2.8999999999999999e-212 or 1.40000000000000003e-281 < y < 1.55e-230

    1. Initial program 82.0%

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

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

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

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

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

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

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

    if -2.8999999999999999e-212 < y < 1.40000000000000003e-281 or 1.55e-230 < y < 1.05000000000000001e-51

    1. Initial program 69.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    4. Step-by-step derivation
      1. mul-1-neg56.0%

        \[\leadsto \color{blue}{-\frac{a}{b}} \]
    5. Simplified56.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-212}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-281}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-230}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-51}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 10: 54.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-40}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-47}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (- 1.0 z))))
   (if (<= y -7.8e+77)
     t_1
     (if (<= y -2.1e-40)
       (/ t (- b y))
       (if (<= y -1.2e-47)
         (+ x (* z x))
         (if (<= y 5.7e-49) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (1.0 - z);
	double tmp;
	if (y <= -7.8e+77) {
		tmp = t_1;
	} else if (y <= -2.1e-40) {
		tmp = t / (b - y);
	} else if (y <= -1.2e-47) {
		tmp = x + (z * x);
	} else if (y <= 5.7e-49) {
		tmp = (t - a) / b;
	} else {
		tmp = 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 = x / (1.0d0 - z)
    if (y <= (-7.8d+77)) then
        tmp = t_1
    else if (y <= (-2.1d-40)) then
        tmp = t / (b - y)
    else if (y <= (-1.2d-47)) then
        tmp = x + (z * x)
    else if (y <= 5.7d-49) then
        tmp = (t - a) / b
    else
        tmp = 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 = x / (1.0 - z);
	double tmp;
	if (y <= -7.8e+77) {
		tmp = t_1;
	} else if (y <= -2.1e-40) {
		tmp = t / (b - y);
	} else if (y <= -1.2e-47) {
		tmp = x + (z * x);
	} else if (y <= 5.7e-49) {
		tmp = (t - a) / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (1.0 - z)
	tmp = 0
	if y <= -7.8e+77:
		tmp = t_1
	elif y <= -2.1e-40:
		tmp = t / (b - y)
	elif y <= -1.2e-47:
		tmp = x + (z * x)
	elif y <= 5.7e-49:
		tmp = (t - a) / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(1.0 - z))
	tmp = 0.0
	if (y <= -7.8e+77)
		tmp = t_1;
	elseif (y <= -2.1e-40)
		tmp = Float64(t / Float64(b - y));
	elseif (y <= -1.2e-47)
		tmp = Float64(x + Float64(z * x));
	elseif (y <= 5.7e-49)
		tmp = Float64(Float64(t - a) / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (1.0 - z);
	tmp = 0.0;
	if (y <= -7.8e+77)
		tmp = t_1;
	elseif (y <= -2.1e-40)
		tmp = t / (b - y);
	elseif (y <= -1.2e-47)
		tmp = x + (z * x);
	elseif (y <= 5.7e-49)
		tmp = (t - a) / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+77], t$95$1, If[LessEqual[y, -2.1e-40], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-47], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e-49], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+77}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-47}:\\
\;\;\;\;x + z \cdot x\\

\mathbf{elif}\;y \leq 5.7 \cdot 10^{-49}:\\
\;\;\;\;\frac{t - a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.7999999999999995e77 or 5.7000000000000003e-49 < y

    1. Initial program 52.1%

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

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

        \[\leadsto \frac{x}{\color{blue}{1 + -1 \cdot z}} \]
      2. mul-1-neg47.6%

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

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

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

    if -7.7999999999999995e77 < y < -2.10000000000000018e-40

    1. Initial program 75.2%

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

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

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

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

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

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

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

    if -2.10000000000000018e-40 < y < -1.2e-47

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\frac{x}{-1 \cdot z + 1}} \]
    3. Step-by-step derivation
      1. +-commutative75.2%

        \[\leadsto \frac{x}{\color{blue}{1 + -1 \cdot z}} \]
      2. mul-1-neg75.2%

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    4. Simplified75.2%

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

      \[\leadsto \color{blue}{z \cdot x + x} \]

    if -1.2e-47 < y < 5.7000000000000003e-49

    1. Initial program 75.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-40}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-47}:\\ \;\;\;\;x + z \cdot x\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]

Alternative 11: 73.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-25} \lor \neg \left(z \leq 4.8 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8000000000000001e-25 or 4.80000000000000011e-73 < z

    1. Initial program 49.8%

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

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

    if -5.8000000000000001e-25 < z < 4.80000000000000011e-73

    1. Initial program 86.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-25} \lor \neg \left(z \leq 4.8 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \end{array} \]

Alternative 12: 63.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-26} \lor \neg \left(z \leq 8.4 \cdot 10^{-92}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8000000000000001e-26 or 8.4e-92 < z

    1. Initial program 50.8%

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

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

    if -1.8000000000000001e-26 < z < 8.4e-92

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-26} \lor \neg \left(z \leq 8.4 \cdot 10^{-92}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 44.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-23} \lor \neg \left(z \leq 7 \cdot 10^{-89}\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.3e-23) (not (<= z 7e-89))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -1.3e-23) || !(z <= 7e-89)) {
		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.3d-23)) .or. (.not. (z <= 7d-89))) 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.3e-23) || !(z <= 7e-89)) {
		tmp = t / (b - y);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -1.3e-23) or not (z <= 7e-89):
		tmp = t / (b - y)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -1.3e-23) || !(z <= 7e-89))
		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.3e-23) || ~((z <= 7e-89)))
		tmp = t / (b - y);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e-23], N[Not[LessEqual[z, 7e-89]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-23} \lor \neg \left(z \leq 7 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{t}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3e-23 or 6.9999999999999994e-89 < z

    1. Initial program 50.8%

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

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

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

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

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

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

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

    if -1.3e-23 < z < 6.9999999999999994e-89

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-23} \lor \neg \left(z \leq 7 \cdot 10^{-89}\right):\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 36.6% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.75 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-74}:\\
\;\;\;\;x\\

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


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

    1. Initial program 47.0%

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

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

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

    if -3.74999999999999994e-25 < z < 2.25e-74

    1. Initial program 85.9%

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

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

    if 2.25e-74 < z

    1. Initial program 53.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    4. Step-by-step derivation
      1. mul-1-neg27.9%

        \[\leadsto \color{blue}{-\frac{a}{b}} \]
    5. Simplified27.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.75 \cdot 10^{-25}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-74}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b}\\ \end{array} \]

Alternative 15: 36.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{b}\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-89}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2000000000000002e-25 or 6.8000000000000001e-89 < z

    1. Initial program 50.8%

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

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

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

    if -2.2000000000000002e-25 < z < 6.8000000000000001e-89

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-25}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-89}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b}\\ \end{array} \]

Alternative 16: 25.4% 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 64.6%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification22.9%

    \[\leadsto x \]

Developer target: 72.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 2023279 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

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

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