Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.7% → 93.0%
Time: 18.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 66.7% 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: 93.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z, b - y, y\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+70} \lor \neg \left(z \leq 3.55 \cdot 10^{+56}\right):\\ \;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{a}{\left(b + \frac{y}{z}\right) - y}, \frac{x}{\frac{t_1}{y}} + \frac{z \cdot t}{t_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma z (- b y) y)))
   (if (or (<= z -1.3e+70) (not (<= z 3.55e+56)))
     (+
      (+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
      (* (/ y z) (/ (- a t) (pow (- b y) 2.0))))
     (fma
      -1.0
      (/ a (- (+ b (/ y z)) y))
      (+ (/ x (/ t_1 y)) (/ (* z t) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(z, (b - y), y);
	double tmp;
	if ((z <= -1.3e+70) || !(z <= 3.55e+56)) {
		tmp = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
	} else {
		tmp = fma(-1.0, (a / ((b + (y / z)) - y)), ((x / (t_1 / y)) + ((z * t) / t_1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(z, Float64(b - y), y)
	tmp = 0.0
	if ((z <= -1.3e+70) || !(z <= 3.55e+56))
		tmp = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0))));
	else
		tmp = fma(-1.0, Float64(a / Float64(Float64(b + Float64(y / z)) - y)), Float64(Float64(x / Float64(t_1 / y)) + Float64(Float64(z * t) / t_1)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, If[Or[LessEqual[z, -1.3e+70], N[Not[LessEqual[z, 3.55e+56]], $MachinePrecision]], N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(a / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, y\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+70} \lor \neg \left(z \leq 3.55 \cdot 10^{+56}\right):\\
\;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3e70 or 3.55e56 < z

    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 56.7%

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

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

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

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

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

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

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

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

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

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

    if -1.3e70 < z < 3.55e56

    1. Initial program 87.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 t around 0 87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+70} \lor \neg \left(z \leq 3.55 \cdot 10^{+56}\right):\\ \;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{a}{\left(b + \frac{y}{z}\right) - y}, \frac{x}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{y}} + \frac{z \cdot t}{\mathsf{fma}\left(z, b - y, y\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 89.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot \left(t - a\right)\\ t_2 := \frac{t_1}{y + z \cdot \left(b - y\right)}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{a}{\left(b + \frac{y}{z}\right) - y}, x + \frac{z \cdot t}{\mathsf{fma}\left(z, b - y, y\right)}\right)\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-270} \lor \neg \left(t_2 \leq 0\right) \land t_2 \leq 4 \cdot 10^{+293}:\\ \;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x}{\frac{b - y}{\frac{y}{z}}} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z (- t a)))) (t_2 (/ t_1 (+ y (* z (- b y))))))
   (if (<= t_2 (- INFINITY))
     (fma -1.0 (/ a (- (+ b (/ y z)) y)) (+ x (/ (* z t) (fma z (- b y) y))))
     (if (or (<= t_2 -2e-270) (and (not (<= t_2 0.0)) (<= t_2 4e+293)))
       (/ t_1 (- (* z b) (* y (+ z -1.0))))
       (+
        (+ (/ x (/ (- b y) (/ y z))) (/ (- t a) (- b y)))
        (* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * y) + (z * (t - a));
	double t_2 = t_1 / (y + (z * (b - y)));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(-1.0, (a / ((b + (y / z)) - y)), (x + ((z * t) / fma(z, (b - y), y))));
	} else if ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293))) {
		tmp = t_1 / ((z * b) - (y * (z + -1.0)));
	} else {
		tmp = ((x / ((b - y) / (y / z))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * y) + Float64(z * Float64(t - a)))
	t_2 = Float64(t_1 / Float64(y + Float64(z * Float64(b - y))))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(-1.0, Float64(a / Float64(Float64(b + Float64(y / z)) - y)), Float64(x + Float64(Float64(z * t) / fma(z, Float64(b - y), y))));
	elseif ((t_2 <= -2e-270) || (!(t_2 <= 0.0) && (t_2 <= 4e+293)))
		tmp = Float64(t_1 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))));
	else
		tmp = Float64(Float64(Float64(x / Float64(Float64(b - y) / Float64(y / z))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(-1.0 * N[(a / N[(N[(b + N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(N[(z * t), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -2e-270], And[N[Not[LessEqual[t$95$2, 0.0]], $MachinePrecision], LessEqual[t$95$2, 4e+293]]], N[(t$95$1 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(N[(b - y), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-270} \lor \neg \left(t_2 \leq 0\right) \land t_2 \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\

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


\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

    1. Initial program 37.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 t around 0 33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-270 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.9999999999999997e293

    1. Initial program 99.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 y around -inf 99.6%

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 3.9999999999999997e293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 11.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-270} \lor \neg \left(t_2 \leq 0\right) \land t_2 \leq 4 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_1}{z \cdot b - y \cdot \left(z + -1\right)}\\

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


\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

    1. Initial program 37.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 60.0%

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e-270 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.9999999999999997e293

    1. Initial program 99.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 y around -inf 99.6%

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 3.9999999999999997e293 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 11.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(t - a\right)\\ t_2 := x \cdot y + t_1\\ t_3 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-287}:\\ \;\;\;\;\frac{t_2}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{t_1}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+74}:\\ \;\;\;\;\frac{t_2}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- t a))) (t_2 (+ (* x y) t_1)) (t_3 (/ (- t a) (- b y))))
   (if (<= z -1.05e+20)
     t_3
     (if (<= z 1.4e-287)
       (/ t_2 (+ y (* z (- b y))))
       (if (<= z 3.1e-219)
         (+ x (/ t_1 y))
         (if (<= z 1.75e+74) (/ t_2 (- (* z b) (* y (+ z -1.0)))) t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = (x * y) + t_1;
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -1.05e+20) {
		tmp = t_3;
	} else if (z <= 1.4e-287) {
		tmp = t_2 / (y + (z * (b - y)));
	} else if (z <= 3.1e-219) {
		tmp = x + (t_1 / y);
	} else if (z <= 1.75e+74) {
		tmp = t_2 / ((z * b) - (y * (z + -1.0)));
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z * (t - a)
    t_2 = (x * y) + t_1
    t_3 = (t - a) / (b - y)
    if (z <= (-1.05d+20)) then
        tmp = t_3
    else if (z <= 1.4d-287) then
        tmp = t_2 / (y + (z * (b - y)))
    else if (z <= 3.1d-219) then
        tmp = x + (t_1 / y)
    else if (z <= 1.75d+74) then
        tmp = t_2 / ((z * b) - (y * (z + (-1.0d0))))
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (t - a);
	double t_2 = (x * y) + t_1;
	double t_3 = (t - a) / (b - y);
	double tmp;
	if (z <= -1.05e+20) {
		tmp = t_3;
	} else if (z <= 1.4e-287) {
		tmp = t_2 / (y + (z * (b - y)));
	} else if (z <= 3.1e-219) {
		tmp = x + (t_1 / y);
	} else if (z <= 1.75e+74) {
		tmp = t_2 / ((z * b) - (y * (z + -1.0)));
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (t - a)
	t_2 = (x * y) + t_1
	t_3 = (t - a) / (b - y)
	tmp = 0
	if z <= -1.05e+20:
		tmp = t_3
	elif z <= 1.4e-287:
		tmp = t_2 / (y + (z * (b - y)))
	elif z <= 3.1e-219:
		tmp = x + (t_1 / y)
	elif z <= 1.75e+74:
		tmp = t_2 / ((z * b) - (y * (z + -1.0)))
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(t - a))
	t_2 = Float64(Float64(x * y) + t_1)
	t_3 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -1.05e+20)
		tmp = t_3;
	elseif (z <= 1.4e-287)
		tmp = Float64(t_2 / Float64(y + Float64(z * Float64(b - y))));
	elseif (z <= 3.1e-219)
		tmp = Float64(x + Float64(t_1 / y));
	elseif (z <= 1.75e+74)
		tmp = Float64(t_2 / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (t - a);
	t_2 = (x * y) + t_1;
	t_3 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -1.05e+20)
		tmp = t_3;
	elseif (z <= 1.4e-287)
		tmp = t_2 / (y + (z * (b - y)));
	elseif (z <= 3.1e-219)
		tmp = x + (t_1 / y);
	elseif (z <= 1.75e+74)
		tmp = t_2 / ((z * b) - (y * (z + -1.0)));
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+20], t$95$3, If[LessEqual[z, 1.4e-287], N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-219], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+74], N[(t$95$2 / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{t_1}{y}\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;\frac{t_2}{z \cdot b - y \cdot \left(z + -1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.05e20 or 1.75000000000000007e74 < z

    1. Initial program 29.2%

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

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

    if -1.05e20 < z < 1.4000000000000001e-287

    1. Initial program 91.5%

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

    if 1.4000000000000001e-287 < z < 3.0999999999999997e-219

    1. Initial program 75.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 75.3%

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

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

    if 3.0999999999999997e-219 < z < 1.75000000000000007e74

    1. Initial program 85.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 y around -inf 85.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-287}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{t_1}{y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.5000000000000003e40 or 2.9500000000000001e74 < z

    1. Initial program 27.2%

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

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

    if -9.5000000000000003e40 < z < 2.8e-286

    1. Initial program 91.8%

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

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

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

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

    if 2.8e-286 < z < 1.59999999999999999e-219

    1. Initial program 75.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 75.3%

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

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

    if 1.59999999999999999e-219 < z < 2.9500000000000001e74

    1. Initial program 85.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 y around -inf 85.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-286}:\\ \;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-219}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := \frac{t - a}{b - y}\\ t_3 := z \cdot \left(t - a\right)\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-288}:\\ \;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-220}:\\ \;\;\;\;x + \frac{t_3}{y}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y + t_3}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y))))
        (t_2 (/ (- t a) (- b y)))
        (t_3 (* z (- t a))))
   (if (<= z -5.6e+19)
     t_2
     (if (<= z 1.8e-288)
       (+ (/ (* x y) t_1) (/ t_3 t_1))
       (if (<= z 1.2e-220)
         (+ x (/ t_3 y))
         (if (<= z 9.5e+74)
           (/ (+ (* x y) t_3) (- (* z b) (* y (+ z -1.0))))
           t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = z * (t - a);
	double tmp;
	if (z <= -5.6e+19) {
		tmp = t_2;
	} else if (z <= 1.8e-288) {
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	} else if (z <= 1.2e-220) {
		tmp = x + (t_3 / y);
	} else if (z <= 9.5e+74) {
		tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    t_2 = (t - a) / (b - y)
    t_3 = z * (t - a)
    if (z <= (-5.6d+19)) then
        tmp = t_2
    else if (z <= 1.8d-288) then
        tmp = ((x * y) / t_1) + (t_3 / t_1)
    else if (z <= 1.2d-220) then
        tmp = x + (t_3 / y)
    else if (z <= 9.5d+74) then
        tmp = ((x * y) + t_3) / ((z * b) - (y * (z + (-1.0d0))))
    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 = y + (z * (b - y));
	double t_2 = (t - a) / (b - y);
	double t_3 = z * (t - a);
	double tmp;
	if (z <= -5.6e+19) {
		tmp = t_2;
	} else if (z <= 1.8e-288) {
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	} else if (z <= 1.2e-220) {
		tmp = x + (t_3 / y);
	} else if (z <= 9.5e+74) {
		tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = (t - a) / (b - y)
	t_3 = z * (t - a)
	tmp = 0
	if z <= -5.6e+19:
		tmp = t_2
	elif z <= 1.8e-288:
		tmp = ((x * y) / t_1) + (t_3 / t_1)
	elif z <= 1.2e-220:
		tmp = x + (t_3 / y)
	elif z <= 9.5e+74:
		tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	t_3 = Float64(z * Float64(t - a))
	tmp = 0.0
	if (z <= -5.6e+19)
		tmp = t_2;
	elseif (z <= 1.8e-288)
		tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1));
	elseif (z <= 1.2e-220)
		tmp = Float64(x + Float64(t_3 / y));
	elseif (z <= 9.5e+74)
		tmp = Float64(Float64(Float64(x * y) + t_3) / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = (t - a) / (b - y);
	t_3 = z * (t - a);
	tmp = 0.0;
	if (z <= -5.6e+19)
		tmp = t_2;
	elseif (z <= 1.8e-288)
		tmp = ((x * y) / t_1) + (t_3 / t_1);
	elseif (z <= 1.2e-220)
		tmp = x + (t_3 / y);
	elseif (z <= 9.5e+74)
		tmp = ((x * y) + t_3) / ((z * b) - (y * (z + -1.0)));
	else
		tmp = t_2;
	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[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+19], t$95$2, If[LessEqual[z, 1.8e-288], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-220], N[(x + N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+74], N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+74}:\\
\;\;\;\;\frac{x \cdot y + t_3}{z \cdot b - y \cdot \left(z + -1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.6e19 or 9.5000000000000006e74 < z

    1. Initial program 29.2%

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

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

    if -5.6e19 < z < 1.8000000000000001e-288

    1. Initial program 91.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 x around 0 91.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 1.8000000000000001e-288 < z < 1.2000000000000001e-220

    1. Initial program 75.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 75.3%

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

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

    if 1.2000000000000001e-220 < z < 9.5000000000000006e74

    1. Initial program 85.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 y around -inf 85.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+19}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-288}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-220}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{z \cdot b - y \cdot \left(z + -1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 84.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-285}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{-220}:\\
\;\;\;\;x + \frac{t_1}{y}\\

\mathbf{elif}\;z \leq 2.12 \cdot 10^{+74}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6e19 or 2.11999999999999998e74 < z

    1. Initial program 29.2%

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

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

    if -5.6e19 < z < 6.2000000000000002e-285 or 3.39999999999999993e-220 < z < 2.11999999999999998e74

    1. Initial program 88.6%

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

    if 6.2000000000000002e-285 < z < 3.39999999999999993e-220

    1. Initial program 75.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 75.3%

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

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

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

Alternative 8: 74.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\ t_2 := \frac{t - a}{b - y}\\ \mathbf{if}\;z \leq -2.7 \cdot 10^{+18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-136}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (* x y) (* z a)) (+ y (* z (- b y)))))
        (t_2 (/ (- t a) (- b y))))
   (if (<= z -2.7e+18)
     t_2
     (if (<= z -9e-145)
       t_1
       (if (<= z 8.5e-136)
         (+ x (/ (* z (- t a)) y))
         (if (<= z 1.1e+74) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -2.7e+18) {
		tmp = t_2;
	} else if (z <= -9e-145) {
		tmp = t_1;
	} else if (z <= 8.5e-136) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.1e+74) {
		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 = ((x * y) - (z * a)) / (y + (z * (b - y)))
    t_2 = (t - a) / (b - y)
    if (z <= (-2.7d+18)) then
        tmp = t_2
    else if (z <= (-9d-145)) then
        tmp = t_1
    else if (z <= 8.5d-136) then
        tmp = x + ((z * (t - a)) / y)
    else if (z <= 1.1d+74) 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 = ((x * y) - (z * a)) / (y + (z * (b - y)));
	double t_2 = (t - a) / (b - y);
	double tmp;
	if (z <= -2.7e+18) {
		tmp = t_2;
	} else if (z <= -9e-145) {
		tmp = t_1;
	} else if (z <= 8.5e-136) {
		tmp = x + ((z * (t - a)) / y);
	} else if (z <= 1.1e+74) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)))
	t_2 = (t - a) / (b - y)
	tmp = 0
	if z <= -2.7e+18:
		tmp = t_2
	elif z <= -9e-145:
		tmp = t_1
	elif z <= 8.5e-136:
		tmp = x + ((z * (t - a)) / y)
	elif z <= 1.1e+74:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y + Float64(z * Float64(b - y))))
	t_2 = Float64(Float64(t - a) / Float64(b - y))
	tmp = 0.0
	if (z <= -2.7e+18)
		tmp = t_2;
	elseif (z <= -9e-145)
		tmp = t_1;
	elseif (z <= 8.5e-136)
		tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y));
	elseif (z <= 1.1e+74)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x * y) - (z * a)) / (y + (z * (b - y)));
	t_2 = (t - a) / (b - y);
	tmp = 0.0;
	if (z <= -2.7e+18)
		tmp = t_2;
	elseif (z <= -9e-145)
		tmp = t_1;
	elseif (z <= 8.5e-136)
		tmp = x + ((z * (t - a)) / y);
	elseif (z <= 1.1e+74)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+18], t$95$2, If[LessEqual[z, -9e-145], t$95$1, If[LessEqual[z, 8.5e-136], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+74], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-145}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7e18 or 1.1000000000000001e74 < z

    1. Initial program 29.2%

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

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

    if -2.7e18 < z < -9.0000000000000001e-145 or 8.49999999999999973e-136 < z < 1.1000000000000001e74

    1. Initial program 88.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 t around 0 72.6%

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

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

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

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

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

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

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

    if -9.0000000000000001e-145 < z < 8.49999999999999973e-136

    1. Initial program 85.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 72.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-145}:\\ \;\;\;\;\frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-136}:\\ \;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y - z \cdot a}{y + z \cdot \left(b - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e-81 or 1.48000000000000002e-6 < z

    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 74.1%

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

    if -4.5e-81 < z < 1.48000000000000002e-6

    1. Initial program 84.8%

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

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

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

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

Alternative 10: 67.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2000000000000001e-65 or 4.4000000000000002e-7 < z

    1. Initial program 45.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 74.7%

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

    if -1.2000000000000001e-65 < z < 4.4000000000000002e-7

    1. Initial program 85.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 53.0%

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

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

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

Alternative 11: 42.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05e52 or 2.99999999999999984e-13 < y

    1. Initial program 46.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 y around inf 53.4%

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

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

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

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

    if -1.05e52 < y < 2.99999999999999984e-13

    1. Initial program 78.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 a around inf 37.2%

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

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

        \[\leadsto \frac{\color{blue}{\left(-a\right) \cdot z}}{y + z \cdot \left(b - y\right)} \]
      3. *-commutative37.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified31.1%

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

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

Alternative 12: 54.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+56} \lor \neg \left(y \leq 1.15 \cdot 10^{-12}\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.9e+56) (not (<= y 1.15e-12))) (/ 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.9e+56) || !(y <= 1.15e-12)) {
		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.9d+56)) .or. (.not. (y <= 1.15d-12))) 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.9e+56) || !(y <= 1.15e-12)) {
		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.9e+56) or not (y <= 1.15e-12):
		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.9e+56) || !(y <= 1.15e-12))
		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.9e+56) || ~((y <= 1.15e-12)))
		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.9e+56], N[Not[LessEqual[y, 1.15e-12]], $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.9 \cdot 10^{+56} \lor \neg \left(y \leq 1.15 \cdot 10^{-12}\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.90000000000000007e56 or 1.14999999999999995e-12 < y

    1. Initial program 46.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 y around inf 53.4%

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

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

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

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

    if -2.90000000000000007e56 < y < 1.14999999999999995e-12

    1. Initial program 78.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 y around 0 50.2%

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

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

Alternative 13: 35.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-81}:\\
\;\;\;\;\frac{-a}{b}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + z \cdot x\\

\mathbf{else}:\\
\;\;\;\;\frac{-x}{z}\\


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

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified26.0%

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

    if -3.9999999999999998e-81 < z < 1

    1. Initial program 84.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 y around inf 52.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot x} \]
    8. Simplified52.6%

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

    if 1 < z

    1. Initial program 39.2%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/18.0%

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified18.0%

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

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

Alternative 14: 37.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-81} \lor \neg \left(z \leq 3.5 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{-a}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e-81 or 3.4999999999999998e-10 < z

    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 a around inf 22.6%

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

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

        \[\leadsto \frac{\color{blue}{\left(-a\right) \cdot z}}{y + z \cdot \left(b - y\right)} \]
      3. *-commutative22.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified21.8%

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

    if -4.5e-81 < z < 3.4999999999999998e-10

    1. Initial program 84.8%

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

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

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

Alternative 15: 35.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-81}:\\
\;\;\;\;\frac{-a}{b}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{-x}{z}\\


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

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-a}}{b} \]
    8. Simplified26.0%

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

    if -1.9999999999999999e-81 < z < 1

    1. Initial program 84.8%

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

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

    if 1 < z

    1. Initial program 39.2%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/18.0%

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

        \[\leadsto \frac{\color{blue}{-x}}{z} \]
    8. Simplified18.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-81}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 26.1% 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 62.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 25.0%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification25.0%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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