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

Percentage Accurate: 75.8% → 93.6%
Time: 5.7s
Alternatives: 14
Speedup: 0.3×

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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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}

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 14 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.8% 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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    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: 93.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 + \left(a + \frac{b \cdot y}{t}\right)\\ t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_3 := \mathsf{fma}\left(\frac{b}{t}, y, a - -1\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{t\_3}, \frac{x}{t\_3}\right)\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-244}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-269}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ 1.0 (+ a (/ (* b y) t))))
        (t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
        (t_3 (fma (/ b t) y (- a -1.0))))
   (if (<= t_2 (- INFINITY))
     (fma y (/ (/ z t) t_3) (/ x t_3))
     (if (<= t_2 -1e-244)
       t_2
       (if (<= t_2 5e-269)
         (/
          (/ (fma (/ z t) y x) (fma y (/ (/ b t) (- a -1.0)) 1.0))
          (- a -1.0))
         (if (<= t_2 2e+301)
           t_2
           (if (<= t_2 INFINITY)
             (* z (+ (/ x (* z t_1)) (/ y (* t t_1))))
             (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 1.0 + (a + ((b * y) / t));
	double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_3 = fma((b / t), y, (a - -1.0));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(y, ((z / t) / t_3), (x / t_3));
	} else if (t_2 <= -1e-244) {
		tmp = t_2;
	} else if (t_2 <= 5e-269) {
		tmp = (fma((z / t), y, x) / fma(y, ((b / t) / (a - -1.0)), 1.0)) / (a - -1.0);
	} else if (t_2 <= 2e+301) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = z * ((x / (z * t_1)) + (y / (t * t_1)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(1.0 + Float64(a + Float64(Float64(b * y) / t)))
	t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	t_3 = fma(Float64(b / t), y, Float64(a - -1.0))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z / t) / t_3), Float64(x / t_3));
	elseif (t_2 <= -1e-244)
		tmp = t_2;
	elseif (t_2 <= 5e-269)
		tmp = Float64(Float64(fma(Float64(z / t), y, x) / fma(y, Float64(Float64(b / t) / Float64(a - -1.0)), 1.0)) / Float64(a - -1.0));
	elseif (t_2 <= 2e+301)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1))));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(a + N[(N[(b * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(N[(b / t), $MachinePrecision] * y + N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-244], t$95$2, If[LessEqual[t$95$2, 5e-269], N[(N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(y * N[(N[(b / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+301], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-244}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\

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


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

    1. Initial program 75.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. div-addN/A

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      9. lower-fma.f64N/A

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.9999999999999993e-245 or 4.99999999999999979e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 75.8%

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

    if -9.9999999999999993e-245 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999979e-269

    1. Initial program 75.8%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right) + \frac{y \cdot b}{t}}} \]
      3. sum-to-multN/A

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

        \[\leadsto \color{blue}{\frac{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{\frac{y \cdot b}{t}}{a + 1}}}{a + 1}} \]
      5. lower-/.f64N/A

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

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

    if 2.00000000000000011e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 75.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. 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)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto z \cdot \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)} \]
      2. lower-+.f64N/A

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

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

        \[\leadsto 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) \]
      5. lower-+.f64N/A

        \[\leadsto 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) \]
      6. lower-+.f64N/A

        \[\leadsto 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) \]
      7. lower-/.f64N/A

        \[\leadsto 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) \]
      8. lower-*.f64N/A

        \[\leadsto 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) \]
      9. lower-/.f64N/A

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

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

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 2: 92.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_2 := \mathsf{fma}\left(\frac{b}{t}, y, a - -1\right)\\ t_3 := \mathsf{fma}\left(y, \frac{\frac{z}{t}}{t\_2}, \frac{x}{t\_2}\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-269}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\ \mathbf{elif}\;t\_1 \leq 10^{+247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_3\\ \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)) (+ (+ a 1.0) (/ (* y b) t))))
        (t_2 (fma (/ b t) y (- a -1.0)))
        (t_3 (fma y (/ (/ z t) t_2) (/ x t_2))))
   (if (<= t_1 (- INFINITY))
     t_3
     (if (<= t_1 -1e-244)
       t_1
       (if (<= t_1 5e-269)
         (/
          (/ (fma (/ z t) y x) (fma y (/ (/ b t) (- a -1.0)) 1.0))
          (- a -1.0))
         (if (<= t_1 1e+247) t_1 (if (<= t_1 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_2 = fma((b / t), y, (a - -1.0));
	double t_3 = fma(y, ((z / t) / t_2), (x / t_2));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_1 <= -1e-244) {
		tmp = t_1;
	} else if (t_1 <= 5e-269) {
		tmp = (fma((z / t), y, x) / fma(y, ((b / t) / (a - -1.0)), 1.0)) / (a - -1.0);
	} else if (t_1 <= 1e+247) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	t_2 = fma(Float64(b / t), y, Float64(a - -1.0))
	t_3 = fma(y, Float64(Float64(z / t) / t_2), Float64(x / t_2))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_1 <= -1e-244)
		tmp = t_1;
	elseif (t_1 <= 5e-269)
		tmp = Float64(Float64(fma(Float64(z / t), y, x) / fma(y, Float64(Float64(b / t) / Float64(a - -1.0)), 1.0)) / Float64(a - -1.0));
	elseif (t_1 <= 1e+247)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(b / t), $MachinePrecision] * y + N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(z / t), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, -1e-244], t$95$1, If[LessEqual[t$95$1, 5e-269], N[(N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(y * N[(N[(b / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+247], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\

\mathbf{elif}\;t\_1 \leq 10^{+247}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 9.99999999999999952e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 75.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. div-addN/A

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      9. lower-fma.f64N/A

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.9999999999999993e-245 or 4.99999999999999979e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999952e246

    1. Initial program 75.8%

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

    if -9.9999999999999993e-245 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999979e-269

    1. Initial program 75.8%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right) + \frac{y \cdot b}{t}}} \]
      3. sum-to-multN/A

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

        \[\leadsto \color{blue}{\frac{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{\frac{y \cdot b}{t}}{a + 1}}}{a + 1}} \]
      5. lower-/.f64N/A

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

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 3: 90.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-269}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;t\_1\\ \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)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (fma y (/ (/ z t) (- a -1.0)) (/ x (- a -1.0)))
     (if (<= t_1 -1e-244)
       t_1
       (if (<= t_1 5e-269)
         (/
          (/ (fma (/ z t) y x) (fma y (/ (/ b t) (- a -1.0)) 1.0))
          (- a -1.0))
         (if (<= t_1 2e+301) t_1 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(y, ((z / t) / (a - -1.0)), (x / (a - -1.0)));
	} else if (t_1 <= -1e-244) {
		tmp = t_1;
	} else if (t_1 <= 5e-269) {
		tmp = (fma((z / t), y, x) / fma(y, ((b / t) / (a - -1.0)), 1.0)) / (a - -1.0);
	} else if (t_1 <= 2e+301) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z / t) / Float64(a - -1.0)), Float64(x / Float64(a - -1.0)));
	elseif (t_1 <= -1e-244)
		tmp = t_1;
	elseif (t_1 <= 5e-269)
		tmp = Float64(Float64(fma(Float64(z / t), y, x) / fma(y, Float64(Float64(b / t) / Float64(a - -1.0)), 1.0)) / Float64(a - -1.0));
	elseif (t_1 <= 2e+301)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-244], t$95$1, If[LessEqual[t$95$1, 5e-269], N[(N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(y * N[(N[(b / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+301], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6457.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
    4. Applied rewrites57.2%

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      6. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      8. lift-/.f64N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
    6. Applied rewrites57.4%

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.9999999999999993e-245 or 4.99999999999999979e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 75.8%

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

    if -9.9999999999999993e-245 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999979e-269

    1. Initial program 75.8%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right) + \frac{y \cdot b}{t}}} \]
      3. sum-to-multN/A

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

        \[\leadsto \color{blue}{\frac{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{\frac{y \cdot b}{t}}{a + 1}}}{a + 1}} \]
      5. lower-/.f64N/A

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

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 4: 88.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;t\_1\\ \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)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (fma y (/ (/ z t) (- a -1.0)) (/ x (- a -1.0)))
     (if (<= t_1 2e+301) t_1 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(y, ((z / t) / (a - -1.0)), (x / (a - -1.0)));
	} else if (t_1 <= 2e+301) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z / t) / Float64(a - -1.0)), Float64(x / Float64(a - -1.0)));
	elseif (t_1 <= 2e+301)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+301], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_1\\

\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))) < -inf.0

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6457.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
    4. Applied rewrites57.2%

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      6. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      8. lift-/.f64N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
    6. Applied rewrites57.4%

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 75.8%

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 5: 87.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;\frac{t\_1}{\mathsf{fma}\left(b, \frac{y}{t}, 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 (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_2 (- INFINITY))
     (fma y (/ (/ z t) (- a -1.0)) (/ x (- a -1.0)))
     (if (<= t_2 2e+301) (/ t_1 (fma 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 / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(y, ((z / t) / (a - -1.0)), (x / (a - -1.0)));
	} else if (t_2 <= 2e+301) {
		tmp = t_1 / fma(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(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z / t) / Float64(a - -1.0)), Float64(x / Float64(a - -1.0)));
	elseif (t_2 <= 2e+301)
		tmp = Float64(t_1 / fma(b, Float64(y / t), Float64(a - -1.0)));
	else
		tmp = Float64(z / b);
	end
	return 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+301], N[(t$95$1 / N[(b * N[(y / t), $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}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(b, \frac{y}{t}, 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))) < -inf.0

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6457.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
    4. Applied rewrites57.2%

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      6. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      8. lift-/.f64N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
    6. Applied rewrites57.4%

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 75.8%

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{b \cdot \frac{y}{t}} + \left(a + 1\right)} \]
      7. lower-fma.f64N/A

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

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\mathsf{fma}\left(b, \frac{y}{t}, \color{blue}{a - \left(\mathsf{neg}\left(1\right)\right)}\right)} \]
      11. lower--.f64N/A

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

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

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 6: 83.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, 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)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (fma y (/ (/ z t) (- a -1.0)) (/ x (- a -1.0)))
     (if (<= t_1 2e+301)
       (/ (fma (/ z t) y x) (fma (/ b t) y (- 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)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(y, ((z / t) / (a - -1.0)), (x / (a - -1.0)));
	} else if (t_1 <= 2e+301) {
		tmp = fma((z / t), y, x) / fma((b / t), y, (a - -1.0));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z / t) / Float64(a - -1.0)), Float64(x / Float64(a - -1.0)));
	elseif (t_1 <= 2e+301)
		tmp = Float64(fma(Float64(z / t), y, x) / fma(Float64(b / t), y, Float64(a - -1.0)));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+301], N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(N[(b / t), $MachinePrecision] * y + N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, 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))) < -inf.0

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6457.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
    4. Applied rewrites57.2%

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      6. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      8. lift-/.f64N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
    6. Applied rewrites57.4%

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 75.8%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      7. lower-fma.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\color{blue}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      16. lower-/.f6475.7

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, \color{blue}{a + 1}\right)} \]
      18. add-flipN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, \color{blue}{a - \left(\mathsf{neg}\left(1\right)\right)}\right)} \]
      19. lower--.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, \color{blue}{a - \left(\mathsf{neg}\left(1\right)\right)}\right)} \]
      20. metadata-eval75.7

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

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

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

    1. Initial program 75.8%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    3. Step-by-step derivation
      1. lower-/.f6433.5

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    4. Applied rewrites33.5%

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

Alternative 7: 69.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -2 or 2 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6457.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
    4. Applied rewrites57.2%

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      6. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
      8. lift-/.f64N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
    6. Applied rewrites57.4%

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

    if -2 < (+.f64 a #s(literal 1 binary64)) < 2

    1. Initial program 75.8%

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1} + \frac{y \cdot b}{t}} \]
    3. Step-by-step derivation
      1. Applied rewrites46.1%

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

    Alternative 8: 69.2% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{-43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-141}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (fma y (/ (/ z t) (- a -1.0)) (/ x (- a -1.0)))))
       (if (<= t -2.1e-43)
         t_1
         (if (<= t 3.25e-141) (/ (+ z (/ (* t x) y)) b) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = fma(y, ((z / t) / (a - -1.0)), (x / (a - -1.0)));
    	double tmp;
    	if (t <= -2.1e-43) {
    		tmp = t_1;
    	} else if (t <= 3.25e-141) {
    		tmp = (z + ((t * x) / y)) / b;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = fma(y, Float64(Float64(z / t) / Float64(a - -1.0)), Float64(x / Float64(a - -1.0)))
    	tmp = 0.0
    	if (t <= -2.1e-43)
    		tmp = t_1;
    	elseif (t <= 3.25e-141)
    		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(z / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e-43], t$95$1, If[LessEqual[t, 3.25e-141], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y, \frac{\frac{z}{t}}{a - -1}, \frac{x}{a - -1}\right)\\
    \mathbf{if}\;t \leq -2.1 \cdot 10^{-43}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 3.25 \cdot 10^{-141}:\\
    \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -2.1000000000000001e-43 or 3.2499999999999998e-141 < t

      1. Initial program 75.8%

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
      3. Step-by-step derivation
        1. lower-+.f6457.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
      4. Applied rewrites57.2%

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

          \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
        4. div-addN/A

          \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a} + \frac{x}{1 + a}} \]
        5. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{1 + a} + \frac{x}{1 + a} \]
        6. lift-*.f64N/A

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{1 + a} + \frac{x}{1 + a} \]
        8. lift-/.f64N/A

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{1 + a}} + \frac{x}{1 + a} \]
        10. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\frac{z}{t}}{1 + a}, \frac{x}{1 + a}\right)} \]
      6. Applied rewrites57.4%

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

      if -2.1000000000000001e-43 < t < 3.2499999999999998e-141

      1. Initial program 75.8%

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. div-addN/A

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        9. lower-fma.f64N/A

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
        4. lower-*.f6439.5

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      6. Applied rewrites39.5%

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

    Alternative 9: 69.0% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - -1}\\ \mathbf{if}\;t \leq -3 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-136}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (fma y (/ z t) x) (- a -1.0))))
       (if (<= t -3e-18) t_1 (if (<= t 2.75e-136) (/ (+ z (/ (* t x) y)) b) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = fma(y, (z / t), x) / (a - -1.0);
    	double tmp;
    	if (t <= -3e-18) {
    		tmp = t_1;
    	} else if (t <= 2.75e-136) {
    		tmp = (z + ((t * x) / y)) / b;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(fma(y, Float64(z / t), x) / Float64(a - -1.0))
    	tmp = 0.0
    	if (t <= -3e-18)
    		tmp = t_1;
    	elseif (t <= 2.75e-136)
    		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e-18], t$95$1, If[LessEqual[t, 2.75e-136], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - -1}\\
    \mathbf{if}\;t \leq -3 \cdot 10^{-18}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 2.75 \cdot 10^{-136}:\\
    \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -2.99999999999999983e-18 or 2.75e-136 < t

      1. Initial program 75.8%

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
      3. Step-by-step derivation
        1. lower-+.f6457.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{a}} \]
      4. Applied rewrites57.2%

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

          \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{1 + a} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{1 + a} \]
        4. lift-*.f64N/A

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{1 + a} \]
        6. lift-/.f64N/A

          \[\leadsto \frac{y \cdot \color{blue}{\frac{z}{t}} + x}{1 + a} \]
        7. lower-fma.f6457.4

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{1 + a} \]
        8. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \color{blue}{a}} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \color{blue}{1}} \]
        10. add-flipN/A

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}} \]
        11. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - -1} \]
        12. lift--.f6457.4

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - \color{blue}{-1}} \]
      6. Applied rewrites57.4%

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

      if -2.99999999999999983e-18 < t < 2.75e-136

      1. Initial program 75.8%

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. div-addN/A

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        9. lower-fma.f64N/A

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
        4. lower-*.f6439.5

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      6. Applied rewrites39.5%

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

    Alternative 10: 55.6% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a + 1 \leq -5 \cdot 10^{+97}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\ \mathbf{elif}\;a + 1 \leq 10^{+18}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (+ a 1.0) -5e+97)
       (/ (fma z (/ y t) x) a)
       (if (<= (+ a 1.0) 1e+18)
         (/ (+ z (/ (* t x) y)) b)
         (/ (+ x (/ y (/ t z))) a))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if ((a + 1.0) <= -5e+97) {
    		tmp = fma(z, (y / t), x) / a;
    	} else if ((a + 1.0) <= 1e+18) {
    		tmp = (z + ((t * x) / y)) / b;
    	} else {
    		tmp = (x + (y / (t / z))) / a;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (Float64(a + 1.0) <= -5e+97)
    		tmp = Float64(fma(z, Float64(y / t), x) / a);
    	elseif (Float64(a + 1.0) <= 1e+18)
    		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
    	else
    		tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -5e+97], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1e+18], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a + 1 \leq -5 \cdot 10^{+97}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\
    
    \mathbf{elif}\;a + 1 \leq 10^{+18}:\\
    \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 a #s(literal 1 binary64)) < -4.99999999999999999e97

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        4. lower-*.f6434.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. Applied rewrites34.2%

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{z \cdot y}{t} + x}{a} \]
        6. associate-/l*N/A

          \[\leadsto \frac{z \cdot \frac{y}{t} + x}{a} \]
        7. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]
        8. lower-/.f6435.1

          \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]
      6. Applied rewrites35.1%

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]

      if -4.99999999999999999e97 < (+.f64 a #s(literal 1 binary64)) < 1e18

      1. Initial program 75.8%

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. div-addN/A

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        9. lower-fma.f64N/A

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
        4. lower-*.f6439.5

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      6. Applied rewrites39.5%

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

      if 1e18 < (+.f64 a #s(literal 1 binary64))

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        4. lower-*.f6434.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. Applied rewrites34.2%

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. associate-/l*N/A

          \[\leadsto \frac{x + y \cdot \frac{z}{t}}{a} \]
        4. div-flipN/A

          \[\leadsto \frac{x + y \cdot \frac{1}{\frac{t}{z}}}{a} \]
        5. mult-flip-revN/A

          \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a} \]
        6. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a} \]
        7. lower-/.f6434.3

          \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a} \]
      6. Applied rewrites34.3%

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 11: 54.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a + 1 \leq -5 \cdot 10^{+97}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\ \mathbf{elif}\;a + 1 \leq 10^{+18}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{a}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (+ a 1.0) -5e+97)
       (/ (fma z (/ y t) x) a)
       (if (<= (+ a 1.0) 1e+18)
         (/ (+ z (/ (* t x) y)) b)
         (/ (fma (/ z t) y x) a))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if ((a + 1.0) <= -5e+97) {
    		tmp = fma(z, (y / t), x) / a;
    	} else if ((a + 1.0) <= 1e+18) {
    		tmp = (z + ((t * x) / y)) / b;
    	} else {
    		tmp = fma((z / t), y, x) / a;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (Float64(a + 1.0) <= -5e+97)
    		tmp = Float64(fma(z, Float64(y / t), x) / a);
    	elseif (Float64(a + 1.0) <= 1e+18)
    		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
    	else
    		tmp = Float64(fma(Float64(z / t), y, x) / a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -5e+97], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1e+18], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / a), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a + 1 \leq -5 \cdot 10^{+97}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\
    
    \mathbf{elif}\;a + 1 \leq 10^{+18}:\\
    \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 a #s(literal 1 binary64)) < -4.99999999999999999e97

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        4. lower-*.f6434.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. Applied rewrites34.2%

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{z \cdot y}{t} + x}{a} \]
        6. associate-/l*N/A

          \[\leadsto \frac{z \cdot \frac{y}{t} + x}{a} \]
        7. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]
        8. lower-/.f6435.1

          \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]
      6. Applied rewrites35.1%

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a} \]

      if -4.99999999999999999e97 < (+.f64 a #s(literal 1 binary64)) < 1e18

      1. Initial program 75.8%

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. div-addN/A

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} + \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        9. lower-fma.f64N/A

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
        4. lower-*.f6439.5

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      6. Applied rewrites39.5%

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

      if 1e18 < (+.f64 a #s(literal 1 binary64))

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        4. lower-*.f6434.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. Applied rewrites34.2%

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\frac{y \cdot z}{t} + x}{a} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{z \cdot y}{t} + x}{a} \]
        6. associate-*l/N/A

          \[\leadsto \frac{\frac{z}{t} \cdot y + x}{a} \]
        7. lift-/.f64N/A

          \[\leadsto \frac{\frac{z}{t} \cdot y + x}{a} \]
        8. lower-fma.f6434.2

          \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{a} \]
      6. Applied rewrites34.2%

        \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{a} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 12: 54.8% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+20}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+114}:\\ \;\;\;\;\frac{x}{a - -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= y -9.2e+20) (/ z b) (if (<= y 1.8e+114) (/ x (- a -1.0)) (/ z b))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (y <= -9.2e+20) {
    		tmp = z / b;
    	} else if (y <= 1.8e+114) {
    		tmp = x / (a - -1.0);
    	} else {
    		tmp = z / b;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b)
    use fmin_fmax_functions
        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 <= (-9.2d+20)) then
            tmp = z / b
        else if (y <= 1.8d+114) then
            tmp = x / (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 tmp;
    	if (y <= -9.2e+20) {
    		tmp = z / b;
    	} else if (y <= 1.8e+114) {
    		tmp = x / (a - -1.0);
    	} else {
    		tmp = z / b;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if y <= -9.2e+20:
    		tmp = z / b
    	elif y <= 1.8e+114:
    		tmp = x / (a - -1.0)
    	else:
    		tmp = z / b
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (y <= -9.2e+20)
    		tmp = Float64(z / b);
    	elseif (y <= 1.8e+114)
    		tmp = Float64(x / Float64(a - -1.0));
    	else
    		tmp = Float64(z / b);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (y <= -9.2e+20)
    		tmp = z / b;
    	elseif (y <= 1.8e+114)
    		tmp = x / (a - -1.0);
    	else
    		tmp = z / b;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.2e+20], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.8e+114], N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -9.2 \cdot 10^{+20}:\\
    \;\;\;\;\frac{z}{b}\\
    
    \mathbf{elif}\;y \leq 1.8 \cdot 10^{+114}:\\
    \;\;\;\;\frac{x}{a - -1}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z}{b}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -9.2e20 or 1.8e114 < y

      1. Initial program 75.8%

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

        \[\leadsto \color{blue}{\frac{z}{b}} \]
      3. Step-by-step derivation
        1. lower-/.f6433.5

          \[\leadsto \frac{z}{\color{blue}{b}} \]
      4. Applied rewrites33.5%

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

      if -9.2e20 < y < 1.8e114

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
        2. lower-+.f6442.4

          \[\leadsto \frac{x}{1 + \color{blue}{a}} \]
      4. Applied rewrites42.4%

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

          \[\leadsto \frac{x}{1 + \color{blue}{a}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{x}{a + \color{blue}{1}} \]
        3. add-flipN/A

          \[\leadsto \frac{x}{a - \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}} \]
        4. metadata-evalN/A

          \[\leadsto \frac{x}{a - -1} \]
        5. lift--.f6442.4

          \[\leadsto \frac{x}{a - \color{blue}{-1}} \]
      6. Applied rewrites42.4%

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

    Alternative 13: 41.3% accurate, 2.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{+177}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= a -8.2e+177) (/ x a) (if (<= a 1.02e+18) (/ z b) (/ x a))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (a <= -8.2e+177) {
    		tmp = x / a;
    	} else if (a <= 1.02e+18) {
    		tmp = z / b;
    	} else {
    		tmp = x / a;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b)
    use fmin_fmax_functions
        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 (a <= (-8.2d+177)) then
            tmp = x / a
        else if (a <= 1.02d+18) then
            tmp = z / b
        else
            tmp = x / a
        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 (a <= -8.2e+177) {
    		tmp = x / a;
    	} else if (a <= 1.02e+18) {
    		tmp = z / b;
    	} else {
    		tmp = x / a;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if a <= -8.2e+177:
    		tmp = x / a
    	elif a <= 1.02e+18:
    		tmp = z / b
    	else:
    		tmp = x / a
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (a <= -8.2e+177)
    		tmp = Float64(x / a);
    	elseif (a <= 1.02e+18)
    		tmp = Float64(z / b);
    	else
    		tmp = Float64(x / a);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (a <= -8.2e+177)
    		tmp = x / a;
    	elseif (a <= 1.02e+18)
    		tmp = z / b;
    	else
    		tmp = x / a;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.2e+177], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.02e+18], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq -8.2 \cdot 10^{+177}:\\
    \;\;\;\;\frac{x}{a}\\
    
    \mathbf{elif}\;a \leq 1.02 \cdot 10^{+18}:\\
    \;\;\;\;\frac{z}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -8.20000000000000029e177 or 1.02e18 < a

      1. Initial program 75.8%

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

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

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
        2. lower-+.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
        4. lower-*.f6434.2

          \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. Applied rewrites34.2%

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

        \[\leadsto \frac{x}{\color{blue}{a}} \]
      6. Step-by-step derivation
        1. lower-/.f6425.6

          \[\leadsto \frac{x}{a} \]
      7. Applied rewrites25.6%

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

      if -8.20000000000000029e177 < a < 1.02e18

      1. Initial program 75.8%

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

        \[\leadsto \color{blue}{\frac{z}{b}} \]
      3. Step-by-step derivation
        1. lower-/.f6433.5

          \[\leadsto \frac{z}{\color{blue}{b}} \]
      4. Applied rewrites33.5%

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

    Alternative 14: 25.6% accurate, 5.8× 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;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b)
    use fmin_fmax_functions
        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 75.8%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{a}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      3. lower-/.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
      4. lower-*.f6434.2

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{a} \]
    4. Applied rewrites34.2%

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

      \[\leadsto \frac{x}{\color{blue}{a}} \]
    6. Step-by-step derivation
      1. lower-/.f6425.6

        \[\leadsto \frac{x}{a} \]
    7. Applied rewrites25.6%

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

    Reproduce

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