Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 65.5% → 96.5%
Time: 17.8s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 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.5% 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: 96.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := b + \left(\frac{y}{z} - y\right)\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{y \cdot x + t\_3}{t\_1}\\ t_5 := \frac{t}{t\_2} + \left(x \cdot \frac{\frac{1}{z}}{\frac{1}{z} + -1} - \frac{a}{t\_2}\right)\\ t_6 := \frac{y \cdot x}{t\_1} + \frac{t\_3}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-297}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_4 \leq 0:\\ \;\;\;\;x \cdot \left(\frac{\frac{y}{z}}{t\_2} + \frac{\frac{t - a}{t\_2}}{x}\right)\\ \mathbf{elif}\;t\_4 \leq 10^{+287}:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (+ b (- (/ y z) y)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ (* y x) t_3) t_1))
        (t_5
         (+ (/ t t_2) (- (* x (/ (/ 1.0 z) (+ (/ 1.0 z) -1.0))) (/ a t_2))))
        (t_6 (+ (/ (* y x) t_1) (/ t_3 t_1))))
   (if (<= t_4 (- INFINITY))
     t_5
     (if (<= t_4 -5e-297)
       t_6
       (if (<= t_4 0.0)
         (* x (+ (/ (/ y z) t_2) (/ (/ (- t a) t_2) x)))
         (if (<= t_4 1e+287) t_6 t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = z * (t - a);
	double t_4 = ((y * x) + t_3) / t_1;
	double t_5 = (t / t_2) + ((x * ((1.0 / z) / ((1.0 / z) + -1.0))) - (a / t_2));
	double t_6 = ((y * x) / t_1) + (t_3 / t_1);
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_5;
	} else if (t_4 <= -5e-297) {
		tmp = t_6;
	} else if (t_4 <= 0.0) {
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	} else if (t_4 <= 1e+287) {
		tmp = t_6;
	} else {
		tmp = t_5;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = z * (t - a);
	double t_4 = ((y * x) + t_3) / t_1;
	double t_5 = (t / t_2) + ((x * ((1.0 / z) / ((1.0 / z) + -1.0))) - (a / t_2));
	double t_6 = ((y * x) / t_1) + (t_3 / t_1);
	double tmp;
	if (t_4 <= -Double.POSITIVE_INFINITY) {
		tmp = t_5;
	} else if (t_4 <= -5e-297) {
		tmp = t_6;
	} else if (t_4 <= 0.0) {
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	} else if (t_4 <= 1e+287) {
		tmp = t_6;
	} else {
		tmp = t_5;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = b + ((y / z) - y)
	t_3 = z * (t - a)
	t_4 = ((y * x) + t_3) / t_1
	t_5 = (t / t_2) + ((x * ((1.0 / z) / ((1.0 / z) + -1.0))) - (a / t_2))
	t_6 = ((y * x) / t_1) + (t_3 / t_1)
	tmp = 0
	if t_4 <= -math.inf:
		tmp = t_5
	elif t_4 <= -5e-297:
		tmp = t_6
	elif t_4 <= 0.0:
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x))
	elif t_4 <= 1e+287:
		tmp = t_6
	else:
		tmp = t_5
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(b + Float64(Float64(y / z) - y))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(Float64(y * x) + t_3) / t_1)
	t_5 = Float64(Float64(t / t_2) + Float64(Float64(x * Float64(Float64(1.0 / z) / Float64(Float64(1.0 / z) + -1.0))) - Float64(a / t_2)))
	t_6 = Float64(Float64(Float64(y * x) / t_1) + Float64(t_3 / t_1))
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = t_5;
	elseif (t_4 <= -5e-297)
		tmp = t_6;
	elseif (t_4 <= 0.0)
		tmp = Float64(x * Float64(Float64(Float64(y / z) / t_2) + Float64(Float64(Float64(t - a) / t_2) / x)));
	elseif (t_4 <= 1e+287)
		tmp = t_6;
	else
		tmp = t_5;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = b + ((y / z) - y);
	t_3 = z * (t - a);
	t_4 = ((y * x) + t_3) / t_1;
	t_5 = (t / t_2) + ((x * ((1.0 / z) / ((1.0 / z) + -1.0))) - (a / t_2));
	t_6 = ((y * x) / t_1) + (t_3 / t_1);
	tmp = 0.0;
	if (t_4 <= -Inf)
		tmp = t_5;
	elseif (t_4 <= -5e-297)
		tmp = t_6;
	elseif (t_4 <= 0.0)
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	elseif (t_4 <= 1e+287)
		tmp = t_6;
	else
		tmp = t_5;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b + N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(y * x), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t / t$95$2), $MachinePrecision] + N[(N[(x * N[(N[(1.0 / z), $MachinePrecision] / N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -5e-297], t$95$6, If[LessEqual[t$95$4, 0.0], N[(x * N[(N[(N[(y / z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+287], t$95$6, t$95$5]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-297}:\\
\;\;\;\;t\_6\\

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

\mathbf{elif}\;t\_4 \leq 10^{+287}:\\
\;\;\;\;t\_6\\

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


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

    1. Initial program 20.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b + \left(\frac{y}{z} - y\right)} + \left(x \cdot \frac{\frac{y}{z}}{\color{blue}{b + \left(\frac{y}{z} - y\right)}} - \frac{a}{\left(b + \frac{y}{z}\right) - y}\right) \]
      6. associate-+r-88.0%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-297 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287

    1. Initial program 99.5%

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

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

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

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

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

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

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

    1. Initial program 25.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := b + \left(\frac{y}{z} - y\right)\\ t_3 := z \cdot \left(t - a\right)\\ t_4 := \frac{y \cdot x + t\_3}{t\_1}\\ \mathbf{if}\;t\_4 \leq -\infty \lor \neg \left(t\_4 \leq -5 \cdot 10^{-297} \lor \neg \left(t\_4 \leq 0\right) \land t\_4 \leq 10^{+287}\right):\\ \;\;\;\;x \cdot \left(\frac{\frac{y}{z}}{t\_2} + \frac{\frac{t - a}{t\_2}}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{t\_1} + \frac{t\_3}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (+ b (- (/ y z) y)))
        (t_3 (* z (- t a)))
        (t_4 (/ (+ (* y x) t_3) t_1)))
   (if (or (<= t_4 (- INFINITY))
           (not
            (or (<= t_4 -5e-297) (and (not (<= t_4 0.0)) (<= t_4 1e+287)))))
     (* x (+ (/ (/ y z) t_2) (/ (/ (- t a) t_2) x)))
     (+ (/ (* y x) t_1) (/ t_3 t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = z * (t - a);
	double t_4 = ((y * x) + t_3) / t_1;
	double tmp;
	if ((t_4 <= -((double) INFINITY)) || !((t_4 <= -5e-297) || (!(t_4 <= 0.0) && (t_4 <= 1e+287)))) {
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	} else {
		tmp = ((y * x) / t_1) + (t_3 / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = b + ((y / z) - y);
	double t_3 = z * (t - a);
	double t_4 = ((y * x) + t_3) / t_1;
	double tmp;
	if ((t_4 <= -Double.POSITIVE_INFINITY) || !((t_4 <= -5e-297) || (!(t_4 <= 0.0) && (t_4 <= 1e+287)))) {
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	} else {
		tmp = ((y * x) / t_1) + (t_3 / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = b + ((y / z) - y)
	t_3 = z * (t - a)
	t_4 = ((y * x) + t_3) / t_1
	tmp = 0
	if (t_4 <= -math.inf) or not ((t_4 <= -5e-297) or (not (t_4 <= 0.0) and (t_4 <= 1e+287))):
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x))
	else:
		tmp = ((y * x) / t_1) + (t_3 / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(b + Float64(Float64(y / z) - y))
	t_3 = Float64(z * Float64(t - a))
	t_4 = Float64(Float64(Float64(y * x) + t_3) / t_1)
	tmp = 0.0
	if ((t_4 <= Float64(-Inf)) || !((t_4 <= -5e-297) || (!(t_4 <= 0.0) && (t_4 <= 1e+287))))
		tmp = Float64(x * Float64(Float64(Float64(y / z) / t_2) + Float64(Float64(Float64(t - a) / t_2) / x)));
	else
		tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(t_3 / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = b + ((y / z) - y);
	t_3 = z * (t - a);
	t_4 = ((y * x) + t_3) / t_1;
	tmp = 0.0;
	if ((t_4 <= -Inf) || ~(((t_4 <= -5e-297) || (~((t_4 <= 0.0)) && (t_4 <= 1e+287)))))
		tmp = x * (((y / z) / t_2) + (((t - a) / t_2) / x));
	else
		tmp = ((y * x) / t_1) + (t_3 / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b + N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(y * x), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$4, (-Infinity)], N[Not[Or[LessEqual[t$95$4, -5e-297], And[N[Not[LessEqual[t$95$4, 0.0]], $MachinePrecision], LessEqual[t$95$4, 1e+287]]]], $MachinePrecision]], N[(x * N[(N[(N[(y / z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := b + \left(\frac{y}{z} - y\right)\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{y \cdot x + t\_3}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty \lor \neg \left(t\_4 \leq -5 \cdot 10^{-297} \lor \neg \left(t\_4 \leq 0\right) \land t\_4 \leq 10^{+287}\right):\\
\;\;\;\;x \cdot \left(\frac{\frac{y}{z}}{t\_2} + \frac{\frac{t - a}{t\_2}}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t\_1} + \frac{t\_3}{t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -5e-297 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 1.0000000000000001e287 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5e-297 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.0000000000000001e287

    1. Initial program 99.5%

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

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

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

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

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

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

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

Alternative 3: 94.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := b + \left(\frac{y}{z} - y\right)\\
t_2 := \frac{t}{t\_1}\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+123} \lor \neg \left(y \leq 29000000\right):\\
\;\;\;\;t\_2 + \left(x \cdot \frac{\frac{1}{z}}{\frac{1}{z} + -1} - \frac{a}{t\_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.50000000000000004e123 or 2.9e7 < y

    1. Initial program 60.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b + \left(\frac{y}{z} - y\right)} + \left(x \cdot \frac{\frac{y}{z}}{\color{blue}{b + \left(\frac{y}{z} - y\right)}} - \frac{a}{\left(b + \frac{y}{z}\right) - y}\right) \]
      6. associate-+r-68.5%

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

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

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

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

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

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

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

    if -1.50000000000000004e123 < y < 2.9e7

    1. Initial program 77.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b + \left(\frac{y}{z} - y\right)} + \left(x \cdot \frac{\frac{y}{z}}{\color{blue}{b + \left(\frac{y}{z} - y\right)}} - \frac{a}{\left(b + \frac{y}{z}\right) - y}\right) \]
      6. associate-+r-98.6%

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

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

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

Alternative 4: 84.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+65} \lor \neg \left(z \leq 5.8 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.19999999999999981e65 or 5.7999999999999994e45 < z

    1. Initial program 45.2%

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

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

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

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

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

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

    if -6.19999999999999981e65 < z < 5.7999999999999994e45

    1. Initial program 87.7%

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

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

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

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

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

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

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

Alternative 5: 69.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -7.9 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+20}:\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+106}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{y \cdot \left(z + -1\right)}\\ \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.9e+121)
     t_1
     (if (<= y 8e+20)
       (/ (- t a) (- (+ b (/ y z)) y))
       (if (<= y 9.5e+106)
         (/ (- (* z (- a t)) (* y x)) (* y (+ z -1.0)))
         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.9e+121) {
		tmp = t_1;
	} else if (y <= 8e+20) {
		tmp = (t - a) / ((b + (y / z)) - y);
	} else if (y <= 9.5e+106) {
		tmp = ((z * (a - t)) - (y * x)) / (y * (z + -1.0));
	} 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.9d+121)) then
        tmp = t_1
    else if (y <= 8d+20) then
        tmp = (t - a) / ((b + (y / z)) - y)
    else if (y <= 9.5d+106) then
        tmp = ((z * (a - t)) - (y * x)) / (y * (z + (-1.0d0)))
    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.9e+121) {
		tmp = t_1;
	} else if (y <= 8e+20) {
		tmp = (t - a) / ((b + (y / z)) - y);
	} else if (y <= 9.5e+106) {
		tmp = ((z * (a - t)) - (y * x)) / (y * (z + -1.0));
	} 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.9e+121:
		tmp = t_1
	elif y <= 8e+20:
		tmp = (t - a) / ((b + (y / z)) - y)
	elif y <= 9.5e+106:
		tmp = ((z * (a - t)) - (y * x)) / (y * (z + -1.0))
	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.9e+121)
		tmp = t_1;
	elseif (y <= 8e+20)
		tmp = Float64(Float64(t - a) / Float64(Float64(b + Float64(y / z)) - y));
	elseif (y <= 9.5e+106)
		tmp = Float64(Float64(Float64(z * Float64(a - t)) - Float64(y * x)) / Float64(y * Float64(z + -1.0)));
	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.9e+121)
		tmp = t_1;
	elseif (y <= 8e+20)
		tmp = (t - a) / ((b + (y / z)) - y);
	elseif (y <= 9.5e+106)
		tmp = ((z * (a - t)) - (y * x)) / (y * (z + -1.0));
	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.9e+121], t$95$1, If[LessEqual[y, 8e+20], N[(N[(t - a), $MachinePrecision] / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+106], N[(N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{y \cdot \left(z + -1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.9e121 or 9.4999999999999995e106 < y

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

    if -7.9e121 < y < 8e20

    1. Initial program 77.9%

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

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

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

    if 8e20 < y < 9.4999999999999995e106

    1. Initial program 85.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.9 \cdot 10^{+121}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+20}:\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+106}:\\ \;\;\;\;\frac{z \cdot \left(a - t\right) - y \cdot x}{y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+86}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-94}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+155}:\\ \;\;\;\;x + \frac{t \cdot z}{y}\\ \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 -1.8e+121)
     t_1
     (if (<= y -8e+86)
       (/ a (- y b))
       (if (<= y 2.5e-94)
         (/ (- t a) b)
         (if (<= y 7e+155) (+ x (/ (* t z) y)) 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 <= -1.8e+121) {
		tmp = t_1;
	} else if (y <= -8e+86) {
		tmp = a / (y - b);
	} else if (y <= 2.5e-94) {
		tmp = (t - a) / b;
	} else if (y <= 7e+155) {
		tmp = x + ((t * z) / y);
	} 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 <= (-1.8d+121)) then
        tmp = t_1
    else if (y <= (-8d+86)) then
        tmp = a / (y - b)
    else if (y <= 2.5d-94) then
        tmp = (t - a) / b
    else if (y <= 7d+155) then
        tmp = x + ((t * z) / y)
    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 <= -1.8e+121) {
		tmp = t_1;
	} else if (y <= -8e+86) {
		tmp = a / (y - b);
	} else if (y <= 2.5e-94) {
		tmp = (t - a) / b;
	} else if (y <= 7e+155) {
		tmp = x + ((t * z) / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (1.0 - z)
	tmp = 0
	if y <= -1.8e+121:
		tmp = t_1
	elif y <= -8e+86:
		tmp = a / (y - b)
	elif y <= 2.5e-94:
		tmp = (t - a) / b
	elif y <= 7e+155:
		tmp = x + ((t * z) / y)
	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 <= -1.8e+121)
		tmp = t_1;
	elseif (y <= -8e+86)
		tmp = Float64(a / Float64(y - b));
	elseif (y <= 2.5e-94)
		tmp = Float64(Float64(t - a) / b);
	elseif (y <= 7e+155)
		tmp = Float64(x + Float64(Float64(t * z) / y));
	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 <= -1.8e+121)
		tmp = t_1;
	elseif (y <= -8e+86)
		tmp = a / (y - b);
	elseif (y <= 2.5e-94)
		tmp = (t - a) / b;
	elseif (y <= 7e+155)
		tmp = x + ((t * z) / y);
	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, -1.8e+121], t$95$1, If[LessEqual[y, -8e+86], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-94], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 7e+155], N[(x + N[(N[(t * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -8 \cdot 10^{+86}:\\
\;\;\;\;\frac{a}{y - b}\\

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+155}:\\
\;\;\;\;x + \frac{t \cdot z}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.79999999999999991e121 or 6.99999999999999969e155 < y

    1. Initial program 49.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    7. Simplified70.0%

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

    if -1.79999999999999991e121 < y < -8.0000000000000001e86

    1. Initial program 46.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    7. Simplified77.7%

      \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    8. Taylor expanded in z around inf 67.3%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b - y}} \]
      2. neg-mul-167.3%

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    10. Simplified67.3%

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

    if -8.0000000000000001e86 < y < 2.4999999999999998e-94

    1. Initial program 79.7%

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

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

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

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

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

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

    if 2.4999999999999998e-94 < y < 6.99999999999999969e155

    1. Initial program 79.3%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{z \cdot t}}{y} \]
    7. Simplified48.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+121}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+86}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-94}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+155}:\\ \;\;\;\;x + \frac{t \cdot z}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 84.6% accurate, 0.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + 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 < -1.15e66 or 1.9e46 < z

    1. Initial program 45.2%

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

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

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

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

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

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

    if -1.15e66 < z < 1.9e46

    1. Initial program 87.7%

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

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

Alternative 8: 53.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.85 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.95000000000000007e121 or 5e21 < y

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

    if -2.95000000000000007e121 < y < -2.85000000000000017e81 or 1e-30 < y < 5e21

    1. Initial program 63.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    7. Simplified81.4%

      \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    8. Taylor expanded in z around inf 67.1%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b - y}} \]
      2. neg-mul-167.1%

        \[\leadsto \frac{\color{blue}{-a}}{b - y} \]
    10. Simplified67.1%

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

    if -2.85000000000000017e81 < y < 1e-30

    1. Initial program 80.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.95 \cdot 10^{+121}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -2.85 \cdot 10^{+81}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{elif}\;y \leq 10^{-30}:\\ \;\;\;\;\frac{t - a}{b}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\frac{a}{y - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 83.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+19}:\\
\;\;\;\;\frac{t - a}{b - y}\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + b \cdot z}\\

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


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

    1. Initial program 52.2%

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

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

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

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

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

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

    if -2.3e19 < z < 6.8000000000000004e-19

    1. Initial program 87.7%

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

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

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

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

    if 6.8000000000000004e-19 < z

    1. Initial program 54.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+19}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + b \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{\left(b + \frac{y}{z}\right) - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000015e-18 or 2.8e-40 < z

    1. Initial program 57.0%

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

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

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

    if -7.50000000000000015e-18 < z < 2.8e-40

    1. Initial program 87.3%

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

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

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

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

Alternative 11: 41.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -7 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-51}:\\ \;\;\;\;\frac{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 -7e+96)
     t_1
     (if (<= y -1.05e-239) (/ t b) (if (<= y 1.45e-51) (/ 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 <= -7e+96) {
		tmp = t_1;
	} else if (y <= -1.05e-239) {
		tmp = t / b;
	} else if (y <= 1.45e-51) {
		tmp = 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 <= (-7d+96)) then
        tmp = t_1
    else if (y <= (-1.05d-239)) then
        tmp = t / b
    else if (y <= 1.45d-51) then
        tmp = 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 <= -7e+96) {
		tmp = t_1;
	} else if (y <= -1.05e-239) {
		tmp = t / b;
	} else if (y <= 1.45e-51) {
		tmp = 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 <= -7e+96:
		tmp = t_1
	elif y <= -1.05e-239:
		tmp = t / b
	elif y <= 1.45e-51:
		tmp = 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 <= -7e+96)
		tmp = t_1;
	elseif (y <= -1.05e-239)
		tmp = Float64(t / b);
	elseif (y <= 1.45e-51)
		tmp = Float64(a / Float64(-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 <= -7e+96)
		tmp = t_1;
	elseif (y <= -1.05e-239)
		tmp = t / b;
	elseif (y <= 1.45e-51)
		tmp = 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, -7e+96], t$95$1, If[LessEqual[y, -1.05e-239], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.45e-51], N[(a / (-b)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-51}:\\
\;\;\;\;\frac{a}{-b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.9999999999999998e96 or 1.44999999999999986e-51 < y

    1. Initial program 62.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    7. Simplified52.1%

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

    if -6.9999999999999998e96 < y < -1.0500000000000001e-239

    1. Initial program 71.1%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{z \cdot \left(\left(t + \frac{x \cdot y}{z}\right) - a\right)}}{\mathsf{fma}\left(z, b - y, y\right)} \]
    6. Step-by-step derivation
      1. associate--l+67.1%

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

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

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

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

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

    if -1.0500000000000001e-239 < y < 1.44999999999999986e-51

    1. Initial program 87.1%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    7. Simplified38.4%

      \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    8. Taylor expanded in b around inf 35.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    9. Step-by-step derivation
      1. associate-*r/35.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. neg-mul-135.5%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    10. Simplified35.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+96}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-51}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 74.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \lor \neg \left(z \leq 1.65 \cdot 10^{-20}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5 or 1.65e-20 < z

    1. Initial program 55.0%

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

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

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

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

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

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

    if -5 < z < 1.65e-20

    1. Initial program 87.9%

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

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

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

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

Alternative 13: 33.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+81}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+17}:\\
\;\;\;\;\frac{a}{-b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4999999999999999e81 or 7e17 < y

    1. Initial program 59.5%

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

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

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

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

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

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

    if -2.4999999999999999e81 < y < -1.4999999999999999e-239

    1. Initial program 72.9%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Step-by-step derivation
      1. fma-define72.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. +-commutative72.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-define72.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. Simplified72.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)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 68.9%

      \[\leadsto \frac{\color{blue}{z \cdot \left(\left(t + \frac{x \cdot y}{z}\right) - a\right)}}{\mathsf{fma}\left(z, b - y, y\right)} \]
    6. Step-by-step derivation
      1. associate--l+68.9%

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

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

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

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

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

    if -1.4999999999999999e-239 < y < 7e17

    1. Initial program 85.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    7. Simplified43.9%

      \[\leadsto \frac{\color{blue}{-a}}{\left(b + \frac{y}{z}\right) - y} \]
    8. Taylor expanded in b around inf 33.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{a}{b}} \]
    9. Step-by-step derivation
      1. associate-*r/33.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot a}{b}} \]
      2. neg-mul-133.1%

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    10. Simplified33.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-239}:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+17}:\\ \;\;\;\;\frac{a}{-b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 68.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \lor \neg \left(z \leq 9.5 \cdot 10^{-20}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5 or 9.5e-20 < z

    1. Initial program 55.0%

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

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

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

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

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

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

    if -5 < z < 9.5e-20

    1. Initial program 87.9%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{z \cdot t}}{y} \]
    7. Simplified58.1%

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

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

Alternative 15: 53.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+103} \lor \neg \left(y \leq 1.8 \cdot 10^{-40}\right):\\
\;\;\;\;\frac{x}{1 - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999984e103 or 1.8e-40 < y

    1. Initial program 62.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
    7. Simplified52.9%

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

    if -2.14999999999999984e103 < y < 1.8e-40

    1. Initial program 78.6%

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

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

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

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

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

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

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

Alternative 16: 33.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+81}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4999999999999999e81 or 3.04999999999999995e-52 < y

    1. Initial program 61.2%

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

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

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

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

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

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

    if -2.4999999999999999e81 < y < 3.04999999999999995e-52

    1. Initial program 80.1%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{z \cdot \left(\left(t + \frac{x \cdot y}{z}\right) - a\right)}}{\mathsf{fma}\left(z, b - y, y\right)} \]
    6. Step-by-step derivation
      1. associate--l+78.0%

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

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

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

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

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

Alternative 17: 24.6% accurate, 17.0× speedup?

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

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

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

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

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

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

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

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

Developer Target 1: 73.1% 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 2024165 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

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

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