Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 66.6% → 77.6%
Time: 21.0s
Alternatives: 24
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 24 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.6% 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: 77.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+58}:\\ \;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t - a\right)\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -2.4e+58)
   (+
    (+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
    (* y (/ (- a t) (* z (pow (- b y) 2.0)))))
   (/ (fma x y (* z (- t a))) (fma z (- b y) y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.4e+58) {
		tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
	} else {
		tmp = fma(x, y, (z * (t - a))) / fma(z, (b - y), y);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -2.4e+58)
		tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0)))));
	else
		tmp = Float64(fma(x, y, Float64(z * Float64(t - a))) / fma(z, Float64(b - y), y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+58], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e58

    1. Initial program 34.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 60.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+60.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. +-commutative60.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+60.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. *-commutative60.2%

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

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

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

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

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

    if -2.4e58 < z

    1. Initial program 69.4%

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

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

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

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

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

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

Alternative 2: 77.4% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 7.6000000000000003e30

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

      \[\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)} \]

    if 7.6000000000000003e30 < z

    1. Initial program 31.8%

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

      \[\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+63.3%

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

        \[\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+63.3%

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

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

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

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

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

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

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

Alternative 3: 71.7% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+24}:\\
\;\;\;\;\frac{y \cdot x - \left(z \cdot a - z \cdot t\right)}{y + z \cdot \left(b - y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.5999999999999998e24

    1. Initial program 70.3%

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

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

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

      \[\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 4.5999999999999998e24 < y

    1. Initial program 38.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 x around 0 38.3%

      \[\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)}} \]
    4. Taylor expanded in y around -inf 52.6%

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

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

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

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

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

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

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

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

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

Alternative 4: 73.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ \mathbf{if}\;z \leq 135000000000:\\ \;\;\;\;\frac{z \cdot a}{z \cdot \left(y - b\right) - y} + \left(\frac{z \cdot t}{t\_1} + \frac{y \cdot x}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - a}{b - y} - \frac{x \cdot \frac{y}{y - b} + \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y)))))
   (if (<= z 135000000000.0)
     (+ (/ (* z a) (- (* z (- y b)) y)) (+ (/ (* z t) t_1) (/ (* y x) t_1)))
     (-
      (/ (- t a) (- b y))
      (/ (+ (* x (/ y (- y b))) (/ (* y (- t a)) (pow (- b y) 2.0))) z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if (z <= 135000000000.0) {
		tmp = ((z * a) / ((z * (y - b)) - y)) + (((z * t) / t_1) + ((y * x) / t_1));
	} else {
		tmp = ((t - a) / (b - y)) - (((x * (y / (y - b))) + ((y * (t - a)) / pow((b - y), 2.0))) / 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) :: t_1
    real(8) :: tmp
    t_1 = y + (z * (b - y))
    if (z <= 135000000000.0d0) then
        tmp = ((z * a) / ((z * (y - b)) - y)) + (((z * t) / t_1) + ((y * x) / t_1))
    else
        tmp = ((t - a) / (b - y)) - (((x * (y / (y - b))) + ((y * (t - a)) / ((b - y) ** 2.0d0))) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (z * (b - y));
	double tmp;
	if (z <= 135000000000.0) {
		tmp = ((z * a) / ((z * (y - b)) - y)) + (((z * t) / t_1) + ((y * x) / t_1));
	} else {
		tmp = ((t - a) / (b - y)) - (((x * (y / (y - b))) + ((y * (t - a)) / Math.pow((b - y), 2.0))) / z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	tmp = 0
	if z <= 135000000000.0:
		tmp = ((z * a) / ((z * (y - b)) - y)) + (((z * t) / t_1) + ((y * x) / t_1))
	else:
		tmp = ((t - a) / (b - y)) - (((x * (y / (y - b))) + ((y * (t - a)) / math.pow((b - y), 2.0))) / z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(z * Float64(b - y)))
	tmp = 0.0
	if (z <= 135000000000.0)
		tmp = Float64(Float64(Float64(z * a) / Float64(Float64(z * Float64(y - b)) - y)) + Float64(Float64(Float64(z * t) / t_1) + Float64(Float64(y * x) / t_1)));
	else
		tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(Float64(Float64(x * Float64(y / Float64(y - b))) + Float64(Float64(y * Float64(t - a)) / (Float64(b - y) ^ 2.0))) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	tmp = 0.0;
	if (z <= 135000000000.0)
		tmp = ((z * a) / ((z * (y - b)) - y)) + (((z * t) / t_1) + ((y * x) / t_1));
	else
		tmp = ((t - a) / (b - y)) - (((x * (y / (y - b))) + ((y * (t - a)) / ((b - y) ^ 2.0))) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 135000000000.0], N[(N[(N[(z * a), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * t), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.35e11

    1. Initial program 68.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 68.5%

      \[\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)} \]

    if 1.35e11 < z

    1. Initial program 34.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.2% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 t a) < -4.00000000000000007e234

    1. Initial program 33.8%

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

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

    if -4.00000000000000007e234 < (-.f64 t a)

    1. Initial program 65.4%

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

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

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

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

Alternative 6: 69.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(y - b\right) - y\\ t_2 := z \cdot \left(a - t\right)\\ \mathbf{if}\;\frac{y \cdot x - t\_2}{y + z \cdot \left(b - y\right)} \leq -\infty:\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{t\_1} - \frac{y \cdot x}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (* z (- y b)) y)) (t_2 (* z (- a t))))
   (if (<= (/ (- (* y x) t_2) (+ y (* z (- b y)))) (- INFINITY))
     (/ (- t a) (- b y))
     (- (/ t_2 t_1) (/ (* y x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * (y - b)) - y;
	double t_2 = z * (a - t);
	double tmp;
	if ((((y * x) - t_2) / (y + (z * (b - y)))) <= -((double) INFINITY)) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = (t_2 / t_1) - ((y * x) / t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * (y - b)) - y;
	double t_2 = z * (a - t);
	double tmp;
	if ((((y * x) - t_2) / (y + (z * (b - y)))) <= -Double.POSITIVE_INFINITY) {
		tmp = (t - a) / (b - y);
	} else {
		tmp = (t_2 / t_1) - ((y * x) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * (y - b)) - y
	t_2 = z * (a - t)
	tmp = 0
	if (((y * x) - t_2) / (y + (z * (b - y)))) <= -math.inf:
		tmp = (t - a) / (b - y)
	else:
		tmp = (t_2 / t_1) - ((y * x) / t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * Float64(y - b)) - y)
	t_2 = Float64(z * Float64(a - t))
	tmp = 0.0
	if (Float64(Float64(Float64(y * x) - t_2) / Float64(y + Float64(z * Float64(b - y)))) <= Float64(-Inf))
		tmp = Float64(Float64(t - a) / Float64(b - y));
	else
		tmp = Float64(Float64(t_2 / t_1) - Float64(Float64(y * x) / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * (y - b)) - y;
	t_2 = z * (a - t);
	tmp = 0.0;
	if ((((y * x) - t_2) / (y + (z * (b - y)))) <= -Inf)
		tmp = (t - a) / (b - y);
	else
		tmp = (t_2 / t_1) - ((y * x) / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * x), $MachinePrecision] - t$95$2), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / t$95$1), $MachinePrecision] - N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{t\_1} - \frac{y \cdot x}{t\_1}\\


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

    1. Initial program 27.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 58.5%

      \[\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))))

    1. Initial program 65.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 x around 0 65.3%

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

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

Alternative 7: 66.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \left(b - y\right)\\ t_2 := z \cdot \left(y - b\right) - y\\ \mathbf{if}\;\frac{y \cdot x - z \cdot \left(a - t\right)}{t\_1} \leq 10^{+294}:\\ \;\;\;\;\frac{y \cdot x - \left(z \cdot a - z \cdot t\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{z}{t\_2} - \frac{y \cdot x}{a \cdot t\_2}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (* z (- b y)))) (t_2 (- (* z (- y b)) y)))
   (if (<= (/ (- (* y x) (* z (- a t))) t_1) 1e+294)
     (/ (- (* y x) (- (* z a) (* z t))) t_1)
     (* a (- (/ z t_2) (/ (* y x) (* a 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 = (z * (y - b)) - y;
	double tmp;
	if ((((y * x) - (z * (a - t))) / t_1) <= 1e+294) {
		tmp = ((y * x) - ((z * a) - (z * t))) / t_1;
	} else {
		tmp = a * ((z / t_2) - ((y * x) / (a * 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 = y + (z * (b - y))
    t_2 = (z * (y - b)) - y
    if ((((y * x) - (z * (a - t))) / t_1) <= 1d+294) then
        tmp = ((y * x) - ((z * a) - (z * t))) / t_1
    else
        tmp = a * ((z / t_2) - ((y * x) / (a * 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 = (z * (y - b)) - y;
	double tmp;
	if ((((y * x) - (z * (a - t))) / t_1) <= 1e+294) {
		tmp = ((y * x) - ((z * a) - (z * t))) / t_1;
	} else {
		tmp = a * ((z / t_2) - ((y * x) / (a * t_2)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (z * (b - y))
	t_2 = (z * (y - b)) - y
	tmp = 0
	if (((y * x) - (z * (a - t))) / t_1) <= 1e+294:
		tmp = ((y * x) - ((z * a) - (z * t))) / t_1
	else:
		tmp = a * ((z / t_2) - ((y * x) / (a * 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(z * Float64(y - b)) - y)
	tmp = 0.0
	if (Float64(Float64(Float64(y * x) - Float64(z * Float64(a - t))) / t_1) <= 1e+294)
		tmp = Float64(Float64(Float64(y * x) - Float64(Float64(z * a) - Float64(z * t))) / t_1);
	else
		tmp = Float64(a * Float64(Float64(z / t_2) - Float64(Float64(y * x) / Float64(a * t_2))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (z * (b - y));
	t_2 = (z * (y - b)) - y;
	tmp = 0.0;
	if ((((y * x) - (z * (a - t))) / t_1) <= 1e+294)
		tmp = ((y * x) - ((z * a) - (z * t))) / t_1;
	else
		tmp = a * ((z / t_2) - ((y * x) / (a * 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[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * x), $MachinePrecision] - N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], 1e+294], N[(N[(N[(y * x), $MachinePrecision] - N[(N[(z * a), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(a * N[(N[(z / t$95$2), $MachinePrecision] - N[(N[(y * x), $MachinePrecision] / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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


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

    1. Initial program 79.2%

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

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

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

      \[\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 1.00000000000000007e294 < (/.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 a around inf 19.9%

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

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

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

Alternative 8: 66.5% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 79.3%

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

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

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

      \[\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 1e308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 9.9%

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

      \[\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. Step-by-step derivation
      1. *-commutative8.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.8% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e60

    1. Initial program 31.9%

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

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

    if -1.4e60 < z

    1. Initial program 69.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 60.6%

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

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

Alternative 10: 66.5% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e58

    1. Initial program 34.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 90.8%

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

    if -2.4e58 < z

    1. Initial program 69.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 inf 61.8%

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

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

Alternative 11: 75.8% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4000000000000004e58

    1. Initial program 34.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 90.8%

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

    if -7.4000000000000004e58 < z

    1. Initial program 69.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 68.9%

      \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.8%

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

Alternative 12: 63.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.0000000000000001e59

    1. Initial program 33.1%

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

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

    if -6.0000000000000001e59 < z

    1. Initial program 69.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 inf 65.0%

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

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

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

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

Alternative 13: 63.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.49999999999999993e58

    1. Initial program 34.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 90.8%

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

    if -2.49999999999999993e58 < z

    1. Initial program 69.4%

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

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

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

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

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

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

Alternative 14: 67.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.22e59

    1. Initial program 34.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 90.8%

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

    if -1.22e59 < z

    1. Initial program 69.4%

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

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

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

Alternative 15: 53.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{+59}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 6.0000000000000001e59

    1. Initial program 61.4%

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

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

    if 6.0000000000000001e59 < x

    1. Initial program 61.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 x around 0 61.2%

      \[\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)}} \]
    4. Taylor expanded in y around 0 56.4%

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

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

Alternative 16: 50.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{+115}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 8.99999999999999927e115

    1. Initial program 62.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 58.7%

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

    if 8.99999999999999927e115 < x

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 50.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{+187}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4.79999999999999971e187

    1. Initial program 62.8%

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

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

    if 4.79999999999999971e187 < x

    1. Initial program 48.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 48.7%

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

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

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

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

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

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

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

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

Alternative 18: 50.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{+115}:\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 8.99999999999999927e115

    1. Initial program 62.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 58.7%

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

    if 8.99999999999999927e115 < x

    1. Initial program 55.6%

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

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

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

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

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

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

Alternative 19: 66.3% accurate, 0.9× speedup?

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

\\
\frac{y \cdot x - \left(z \cdot a - z \cdot t\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Derivation
  1. Initial program 61.4%

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

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

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

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

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

Alternative 20: 66.6% accurate, 1.0× speedup?

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

\\
\frac{y \cdot x - z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Derivation
  1. Initial program 61.4%

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

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

Alternative 21: 51.4% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \frac{t - a}{b - y} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ (- t a) (- b y)))
double code(double x, double y, double z, double t, double a, double b) {
	return (t - a) / (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 = (t - a) / (b - y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (t - a) / (b - y);
}
def code(x, y, z, t, a, b):
	return (t - a) / (b - y)
function code(x, y, z, t, a, b)
	return Float64(Float64(t - a) / Float64(b - y))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (t - a) / (b - y);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{t - a}{b - y}
\end{array}
Derivation
  1. Initial program 61.4%

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

    \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
  4. Final simplification52.1%

    \[\leadsto \frac{t - a}{b - y} \]
  5. Add Preprocessing

Alternative 22: 33.1% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \frac{x}{1 - z} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ x (- 1.0 z)))
double code(double x, double y, double z, double t, double a, double b) {
	return x / (1.0 - 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 = x / (1.0d0 - z)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x / (1.0 - z);
}
def code(x, y, z, t, a, b):
	return x / (1.0 - z)
function code(x, y, z, t, a, b)
	return Float64(x / Float64(1.0 - z))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x / (1.0 - z);
end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{1 - z}
\end{array}
Derivation
  1. Initial program 61.4%

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{1 - z}} \]
  6. Final simplification31.2%

    \[\leadsto \frac{x}{1 - z} \]
  7. Add Preprocessing

Alternative 23: 35.6% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \frac{t - a}{b} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ (- t a) b))
double code(double x, double y, double z, double t, double a, double b) {
	return (t - a) / b;
}
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 = (t - a) / b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (t - a) / b;
}
def code(x, y, z, t, a, b):
	return (t - a) / b
function code(x, y, z, t, a, b)
	return Float64(Float64(t - a) / b)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (t - a) / b;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}

\\
\frac{t - a}{b}
\end{array}
Derivation
  1. Initial program 61.4%

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

    \[\leadsto \color{blue}{\frac{t - a}{b}} \]
  4. Final simplification34.1%

    \[\leadsto \frac{t - a}{b} \]
  5. Add Preprocessing

Alternative 24: 25.8% 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 61.4%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification24.5%

    \[\leadsto x \]
  5. Add Preprocessing

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

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

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