Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B

Percentage Accurate: 75.5% → 88.5%
Time: 15.8s
Alternatives: 15
Speedup: 0.6×

Specification

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

\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\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 15 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: 75.5% accurate, 1.0× speedup?

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

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

Alternative 1: 88.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+265}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.9999999999999997e304

    1. Initial program 42.6%

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{x}{z \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)} + \frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{x}{z \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right), \color{blue}{\left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)}\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{\frac{x}{z}}{1 + \left(a + \frac{b \cdot y}{t}\right)}\right), \left(\frac{\color{blue}{y}}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{x}{z}\right), \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)\right), \left(\frac{\color{blue}{y}}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \left(a + \frac{b \cdot y}{t}\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \left(\frac{b \cdot y}{t}\right)\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \left(\frac{y \cdot b}{t}\right)\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      9. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \left(y \cdot \frac{b}{t}\right)\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \left(\frac{b}{t}\right)\right)\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \left(\frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      12. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \left(\frac{\frac{y}{t}}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{y}{t}\right), \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(\color{blue}{1} + \left(a + \frac{b \cdot y}{t}\right)\right)\right)\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, t\right), \mathsf{+.f64}\left(1, \color{blue}{\left(a + \frac{b \cdot y}{t}\right)}\right)\right)\right)\right) \]
      16. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, t\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, t\right), \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \color{blue}{\left(\frac{b \cdot y}{t}\right)}\right)\right)\right)\right)\right) \]
    5. Simplified90.0%

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

    if -4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000007e265

    1. Initial program 88.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(\frac{b \cdot y}{t}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(b \cdot \color{blue}{\frac{y}{t}}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{y}{t}\right)}\right)\right)\right) \]
      4. /-lowering-/.f6490.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right)\right) \]
    4. Applied egg-rr90.2%

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

    if 1.00000000000000007e265 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 12.3%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6489.1%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified89.1%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.1%

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

Alternative 2: 87.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 10^{+265}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.9999999999999997e304

    1. Initial program 42.6%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(z \cdot \left(\frac{x}{z} + \frac{y}{t}\right)\right)}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{x}{z} + \frac{y}{t}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{+.f64}\left(a, 1\right)}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{x}{z}\right), \left(\frac{y}{t}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\frac{y}{t}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      4. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{/.f64}\left(y, t\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    5. Simplified71.4%

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

    if -4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000007e265

    1. Initial program 88.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(\frac{b \cdot y}{t}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(b \cdot \color{blue}{\frac{y}{t}}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{y}{t}\right)}\right)\right)\right) \]
      4. /-lowering-/.f6490.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right)\right) \]
    4. Applied egg-rr90.2%

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

    if 1.00000000000000007e265 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 12.3%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6489.1%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified89.1%

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

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

Alternative 3: 87.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 10^{+265}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -3.99999999999999966e29

    1. Initial program 78.6%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z \cdot y}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(z \cdot \frac{y}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \left(\frac{y}{t}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      4. /-lowering-/.f6485.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(y, t\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    4. Applied egg-rr85.7%

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

    if -3.99999999999999966e29 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000007e265

    1. Initial program 86.6%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(\frac{b \cdot y}{t}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(b \cdot \color{blue}{\frac{y}{t}}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{y}{t}\right)}\right)\right)\right) \]
      4. /-lowering-/.f6489.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right)\right) \]
    4. Applied egg-rr89.4%

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

    if 1.00000000000000007e265 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 12.3%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6489.1%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified89.1%

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

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

Alternative 4: 81.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.2e-184 or 4.2000000000000002e-128 < t

    1. Initial program 80.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{z}{t}\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      4. /-lowering-/.f6484.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    4. Applied egg-rr84.8%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(\frac{b \cdot y}{t}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \left(b \cdot \color{blue}{\frac{y}{t}}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{y}{t}\right)}\right)\right)\right) \]
      4. /-lowering-/.f6489.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right)\right) \]
    6. Applied egg-rr89.2%

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

    if -8.2e-184 < t < 4.2000000000000002e-128

    1. Initial program 56.1%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6432.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified32.6%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(z + \frac{t \cdot x}{y}\right)}, b\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \left(\frac{t \cdot x}{y}\right)\right), b\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\left(t \cdot x\right), y\right)\right), b\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, x\right), y\right)\right), b\right) \]
    8. Simplified76.6%

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

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

Alternative 5: 79.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-129}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.70000000000000029e-207 or 1.45000000000000008e-129 < t

    1. Initial program 80.4%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z \cdot y}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(z \cdot \frac{y}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \left(\frac{y}{t}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      4. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(y, t\right)\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    4. Applied egg-rr84.6%

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

    if -4.70000000000000029e-207 < t < 1.45000000000000008e-129

    1. Initial program 54.9%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6434.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified34.0%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(z + \frac{t \cdot x}{y}\right)}, b\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \left(\frac{t \cdot x}{y}\right)\right), b\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\left(t \cdot x\right), y\right)\right), b\right) \]
      3. *-lowering-*.f6479.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, x\right), y\right)\right), b\right) \]
    8. Simplified79.1%

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

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

Alternative 6: 54.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+77}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.2000000000000002e-80 or 3.39999999999999997e77 < t

    1. Initial program 81.9%

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f6466.7%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified66.7%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]

    if -5.2000000000000002e-80 < t < 6.20000000000000005e-128

    1. Initial program 58.0%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6462.1%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified62.1%

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

    if 6.20000000000000005e-128 < t < 3.39999999999999997e77

    1. Initial program 85.7%

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{a}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), a\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), a\right) \]
      4. *-lowering-*.f6446.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), a\right) \]
    5. Simplified46.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-80}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-128}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+77}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{-57}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-129}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.70000000000000008e-57

    1. Initial program 80.5%

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\color{blue}{1} + a\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(1 + a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(1 + a\right)\right) \]
      5. +-lowering-+.f6474.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified74.6%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{z}{t}\right), y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      4. /-lowering-/.f6482.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
    7. Applied egg-rr82.9%

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

    if -1.70000000000000008e-57 < t < 8.59999999999999962e-129

    1. Initial program 59.4%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6436.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified36.7%

      \[\leadsto \color{blue}{\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}}{b}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{t}{y} \cdot \left(x + \frac{y \cdot z}{t}\right)}{b} \]
      2. associate-/l*N/A

        \[\leadsto \frac{t}{y} \cdot \color{blue}{\frac{x + \frac{y \cdot z}{t}}{b}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{t}{y}\right), \color{blue}{\left(\frac{x + \frac{y \cdot z}{t}}{b}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \left(\frac{\color{blue}{x + \frac{y \cdot z}{t}}}{b}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{b}\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + y \cdot \frac{z}{t}\right), b\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{z}{t} \cdot y\right), b\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), b\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), b\right)\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{1}{\frac{t}{z}}\right)\right), b\right)\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y}{\frac{t}{z}}\right)\right), b\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \left(\frac{t}{z}\right)\right)\right), b\right)\right) \]
      13. /-lowering-/.f6434.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, z\right)\right)\right), b\right)\right) \]
    7. Applied egg-rr34.3%

      \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{x + \frac{y}{\frac{t}{z}}}{b}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{z}{b}\right), \color{blue}{\left(\frac{t \cdot x}{b \cdot y}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\color{blue}{t \cdot x}}{b \cdot y}\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\frac{t \cdot x}{b}}{\color{blue}{y}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\left(\frac{t \cdot x}{b}\right), \color{blue}{y}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t \cdot x\right), b\right), y\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x \cdot t\right), b\right), y\right)\right) \]
      7. *-lowering-*.f6472.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, t\right), b\right), y\right)\right) \]
    10. Simplified72.1%

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

    if 8.59999999999999962e-129 < t

    1. Initial program 83.9%

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\color{blue}{1} + a\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(1 + a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(1 + a\right)\right) \]
      5. +-lowering-+.f6474.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified74.4%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{t} \cdot z + x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{y}{t} + x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(z \cdot \frac{y}{t}\right), x\right), \mathsf{+.f64}\left(\color{blue}{1}, a\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(z \cdot \frac{1}{\frac{t}{y}}\right), x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      6. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{z}{\frac{t}{y}}\right), x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{t}{y}\right)\right), x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      8. /-lowering-/.f6477.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, y\right)\right), x\right), \mathsf{+.f64}\left(1, a\right)\right) \]
    7. Applied egg-rr77.3%

      \[\leadsto \frac{\color{blue}{\frac{z}{\frac{t}{y}} + x}}{1 + a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

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

Alternative 8: 70.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-59}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.5000000000000005e-57 or 4.19999999999999993e-59 < t

    1. Initial program 83.6%

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\color{blue}{1} + a\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(1 + a\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(1 + a\right)\right) \]
      5. +-lowering-+.f6476.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified76.3%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{z}{t}\right), y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
      4. /-lowering-/.f6481.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(1, a\right)\right) \]
    7. Applied egg-rr81.8%

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

    if -9.5000000000000005e-57 < t < 4.19999999999999993e-59

    1. Initial program 60.5%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6437.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified37.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(z + \frac{t \cdot x}{y}\right)}, b\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \left(\frac{t \cdot x}{y}\right)\right), b\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\left(t \cdot x\right), y\right)\right), b\right) \]
      3. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, x\right), y\right)\right), b\right) \]
    8. Simplified69.6%

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

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

Alternative 9: 64.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.1000000000000002e-80 or 2.8e-127 < t

    1. Initial program 82.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, \color{blue}{1}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(a, 1\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right)\right)\right) \]
    4. Applied egg-rr87.9%

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

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\left(a + \frac{b \cdot y}{t}\right) + \color{blue}{1}\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\left(\frac{b \cdot y}{t} + a\right) + 1\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{b \cdot y}{t} + \color{blue}{\left(a + 1\right)}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{b \cdot y}{t} + \left(1 + \color{blue}{a}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{b \cdot y}{t}\right), \color{blue}{\left(1 + a\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(b \cdot y\right), t\right), \left(\color{blue}{1} + a\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(y \cdot b\right), t\right), \left(1 + a\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right), \left(1 + a\right)\right)\right) \]
      10. +-lowering-+.f6464.8%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y, b\right), t\right), \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right)\right) \]
    7. Simplified64.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{y \cdot b}{t} + \left(1 + a\right)}} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{y \cdot b}{t} + \left(a + \color{blue}{1}\right)\right)\right) \]
      2. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\left(\frac{y \cdot b}{t} + a\right) + \color{blue}{1}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{y \cdot b}{t} + a\right), \color{blue}{1}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\frac{y \cdot b}{t}\right), a\right), 1\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\frac{b \cdot y}{t}\right), a\right), 1\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(b \cdot \frac{y}{t}\right), a\right), 1\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, \left(\frac{y}{t}\right)\right), a\right), 1\right)\right) \]
      8. /-lowering-/.f6468.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, \mathsf{/.f64}\left(y, t\right)\right), a\right), 1\right)\right) \]
    9. Applied egg-rr68.1%

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

    if -6.1000000000000002e-80 < t < 2.8e-127

    1. Initial program 58.0%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6435.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified35.7%

      \[\leadsto \color{blue}{\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}}{b}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{t}{y} \cdot \left(x + \frac{y \cdot z}{t}\right)}{b} \]
      2. associate-/l*N/A

        \[\leadsto \frac{t}{y} \cdot \color{blue}{\frac{x + \frac{y \cdot z}{t}}{b}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{t}{y}\right), \color{blue}{\left(\frac{x + \frac{y \cdot z}{t}}{b}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \left(\frac{\color{blue}{x + \frac{y \cdot z}{t}}}{b}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{b}\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + y \cdot \frac{z}{t}\right), b\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{z}{t} \cdot y\right), b\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), b\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), b\right)\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{1}{\frac{t}{z}}\right)\right), b\right)\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y}{\frac{t}{z}}\right)\right), b\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \left(\frac{t}{z}\right)\right)\right), b\right)\right) \]
      13. /-lowering-/.f6434.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, z\right)\right)\right), b\right)\right) \]
    7. Applied egg-rr34.3%

      \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{x + \frac{y}{\frac{t}{z}}}{b}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{z}{b}\right), \color{blue}{\left(\frac{t \cdot x}{b \cdot y}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\color{blue}{t \cdot x}}{b \cdot y}\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\frac{t \cdot x}{b}}{\color{blue}{y}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\left(\frac{t \cdot x}{b}\right), \color{blue}{y}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t \cdot x\right), b\right), y\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x \cdot t\right), b\right), y\right)\right) \]
      7. *-lowering-*.f6472.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, t\right), b\right), y\right)\right) \]
    10. Simplified72.3%

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

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

Alternative 10: 64.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1e-79 or 4.4999999999999999e-127 < t

    1. Initial program 82.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(a + \frac{b \cdot y}{t}\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \color{blue}{\left(\frac{b \cdot y}{t}\right)}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \left(\frac{y \cdot b}{t}\right)\right)\right)\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \left(y \cdot \color{blue}{\frac{b}{t}}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{b}{t}\right)}\right)\right)\right)\right) \]
      7. /-lowering-/.f6468.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(b, \color{blue}{t}\right)\right)\right)\right)\right) \]
    5. Simplified68.1%

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

    if -1e-79 < t < 4.4999999999999999e-127

    1. Initial program 58.0%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6435.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified35.7%

      \[\leadsto \color{blue}{\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}}{b}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{t}{y} \cdot \left(x + \frac{y \cdot z}{t}\right)}{b} \]
      2. associate-/l*N/A

        \[\leadsto \frac{t}{y} \cdot \color{blue}{\frac{x + \frac{y \cdot z}{t}}{b}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{t}{y}\right), \color{blue}{\left(\frac{x + \frac{y \cdot z}{t}}{b}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \left(\frac{\color{blue}{x + \frac{y \cdot z}{t}}}{b}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{b}\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + y \cdot \frac{z}{t}\right), b\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\left(x + \frac{z}{t} \cdot y\right), b\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{z}{t} \cdot y\right)\right), b\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{z}{t}\right)\right), b\right)\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(y \cdot \frac{1}{\frac{t}{z}}\right)\right), b\right)\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y}{\frac{t}{z}}\right)\right), b\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \left(\frac{t}{z}\right)\right)\right), b\right)\right) \]
      13. /-lowering-/.f6434.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, z\right)\right)\right), b\right)\right) \]
    7. Applied egg-rr34.3%

      \[\leadsto \color{blue}{\frac{t}{y} \cdot \frac{x + \frac{y}{\frac{t}{z}}}{b}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{z}{b}\right), \color{blue}{\left(\frac{t \cdot x}{b \cdot y}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\color{blue}{t \cdot x}}{b \cdot y}\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\frac{t \cdot x}{b}}{\color{blue}{y}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\left(\frac{t \cdot x}{b}\right), \color{blue}{y}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t \cdot x\right), b\right), y\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x \cdot t\right), b\right), y\right)\right) \]
      7. *-lowering-*.f6472.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, t\right), b\right), y\right)\right) \]
    10. Simplified72.3%

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

Alternative 11: 60.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 65000000000:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.70000000000000026e-54 or 6.5e10 < t

    1. Initial program 83.1%

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f6464.8%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified64.8%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]

    if -2.70000000000000026e-54 < t < 6.5e10

    1. Initial program 63.5%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6436.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified36.9%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{z}{b}\right), \color{blue}{\left(\frac{t \cdot x}{b \cdot y}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\color{blue}{t \cdot x}}{b \cdot y}\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{t}{b} \cdot \color{blue}{\frac{x}{y}}\right)\right) \]
      4. associate-*l/N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \left(\frac{\frac{t \cdot x}{y}}{b}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\left(\frac{t \cdot x}{y}\right), \color{blue}{b}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t \cdot x\right), y\right), b\right)\right) \]
      8. *-lowering-*.f6466.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(z, b\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(t, x\right), y\right), b\right)\right) \]
    8. Simplified66.4%

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

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

Alternative 12: 60.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.09999999999999963e-49 or 1.25e14 < t

    1. Initial program 83.1%

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f6464.8%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified64.8%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]

    if -6.09999999999999963e-49 < t < 1.25e14

    1. Initial program 63.5%

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot \color{blue}{b}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}}{\color{blue}{b}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y}\right), \color{blue}{b}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(x + \frac{y \cdot z}{t}\right) \cdot t}{y}\right), b\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{t}{y}\right), b\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \left(\frac{t}{y}\right)\right), b\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \left(\frac{t}{y}\right)\right), b\right) \]
      10. /-lowering-/.f6436.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), \mathsf{/.f64}\left(t, y\right)\right), b\right) \]
    5. Simplified36.9%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(z + \frac{t \cdot x}{y}\right)}, b\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \left(\frac{t \cdot x}{y}\right)\right), b\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\left(t \cdot x\right), y\right)\right), b\right) \]
      3. *-lowering-*.f6466.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(z, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, x\right), y\right)\right), b\right) \]
    8. Simplified66.4%

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

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

Alternative 13: 55.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-127}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.30000000000000012e-79 or 1.60000000000000009e-127 < t

    1. Initial program 82.8%

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a\right)}\right) \]
      2. +-lowering-+.f6459.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{a}\right)\right) \]
    5. Simplified59.1%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]

    if -2.30000000000000012e-79 < t < 1.60000000000000009e-127

    1. Initial program 58.0%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6462.1%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified62.1%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.1%

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

Alternative 14: 41.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-71}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8e-71 or 1.40000000000000008e87 < y

    1. Initial program 51.9%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6450.6%

        \[\leadsto \mathsf{/.f64}\left(z, \color{blue}{b}\right) \]
    5. Simplified50.6%

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

    if -1.8e-71 < y < 1.40000000000000008e87

    1. Initial program 93.5%

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{a}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), a\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), a\right) \]
      4. *-lowering-*.f6445.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), a\right) \]
    5. Simplified45.6%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
    6. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{a}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6436.9%

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{a}\right) \]
    8. Simplified36.9%

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

Alternative 15: 25.9% accurate, 5.7× speedup?

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

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 74.5%

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

    \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z}{t}\right), \color{blue}{a}\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{y \cdot z}{t}\right)\right), a\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), t\right)\right), a\right) \]
    4. *-lowering-*.f6434.7%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right), a\right) \]
  5. Simplified34.7%

    \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
  6. Taylor expanded in x around inf

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  7. Step-by-step derivation
    1. /-lowering-/.f6426.6%

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{a}\right) \]
  8. Simplified26.6%

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  9. Add Preprocessing

Developer Target 1: 78.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024139 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))

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