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

Percentage Accurate: 74.7% → 85.4%
Time: 5.3s
Alternatives: 14
Speedup: 0.5×

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: 74.7% 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: 85.4% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 86.4%

      \[\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      3. lower-*.f6479.2

        \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
    7. Applied rewrites79.2%

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

Alternative 2: 85.3% accurate, 0.5× 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 2 \cdot 10^{+304}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{b \cdot y}\\ \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 2e+304) t_1 (+ (/ z b) (/ (* t x) (* b y))))))
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 <= 2e+304) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t * x) / (b * y));
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
    if (t_1 <= 2d+304) then
        tmp = t_1
    else
        tmp = (z / b) + ((t * x) / (b * y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= 2e+304) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t * x) / (b * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
	tmp = 0
	if t_1 <= 2e+304:
		tmp = t_1
	else:
		tmp = (z / b) + ((t * x) / (b * y))
	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 <= 2e+304)
		tmp = t_1;
	else
		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(b * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	tmp = 0.0;
	if (t_1 <= 2e+304)
		tmp = t_1;
	else
		tmp = (z / b) + ((t * x) / (b * y));
	end
	tmp_2 = 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, 2e+304], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(b * y), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 86.4%

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

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

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      3. lower-*.f6479.2

        \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
    7. Applied rewrites79.2%

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

Alternative 3: 73.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-249}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t\_5}\\

\mathbf{elif}\;t\_4 \leq 5000000000:\\
\;\;\;\;\frac{t\_2}{a + t\_1}\\

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\

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


\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 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
      13. lower-+.f6436.9

        \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
    4. Applied rewrites36.9%

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot y}{\left(b \cdot \frac{y}{t} + \left(1 + a\right)\right) \cdot t} \]
      7. times-fracN/A

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.00000000000000011e-249 or 5e9 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

    1. Initial program 99.6%

      \[\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-+.f6476.7

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

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

    if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.99999999999999989e-157

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
    4. Applied rewrites63.9%

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

    if 1.99999999999999989e-157 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5e9

    1. Initial program 99.7%

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

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

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

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

      1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
        3. lower-*.f6479.2

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      7. Applied rewrites79.2%

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

    Alternative 4: 73.0% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ t_2 := \frac{t\_1}{1 + a}\\ t_3 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_4 := \mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;\frac{z}{t\_4} \cdot \frac{y}{t}\\ \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-249}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 10^{-132}:\\ \;\;\;\;\frac{x}{t\_4}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{b \cdot y}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (+ x (/ (* y z) t)))
            (t_2 (/ t_1 (+ 1.0 a)))
            (t_3 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
            (t_4 (fma b (/ y t) (+ 1.0 a))))
       (if (<= t_3 (- INFINITY))
         (* (/ z t_4) (/ y t))
         (if (<= t_3 -2e-249)
           t_2
           (if (<= t_3 1e-132)
             (/ x t_4)
             (if (<= t_3 2e+304) t_2 (+ (/ z b) (/ (* t x) (* b y)))))))))
    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 / (1.0 + a);
    	double t_3 = t_1 / ((a + 1.0) + ((y * b) / t));
    	double t_4 = fma(b, (y / t), (1.0 + a));
    	double tmp;
    	if (t_3 <= -((double) INFINITY)) {
    		tmp = (z / t_4) * (y / t);
    	} else if (t_3 <= -2e-249) {
    		tmp = t_2;
    	} else if (t_3 <= 1e-132) {
    		tmp = x / t_4;
    	} else if (t_3 <= 2e+304) {
    		tmp = t_2;
    	} else {
    		tmp = (z / b) + ((t * x) / (b * y));
    	}
    	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(1.0 + a))
    	t_3 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
    	t_4 = fma(b, Float64(y / t), Float64(1.0 + a))
    	tmp = 0.0
    	if (t_3 <= Float64(-Inf))
    		tmp = Float64(Float64(z / t_4) * Float64(y / t));
    	elseif (t_3 <= -2e-249)
    		tmp = t_2;
    	elseif (t_3 <= 1e-132)
    		tmp = Float64(x / t_4);
    	elseif (t_3 <= 2e+304)
    		tmp = t_2;
    	else
    		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(b * y)));
    	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[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(z / t$95$4), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -2e-249], t$95$2, If[LessEqual[t$95$3, 1e-132], N[(x / t$95$4), $MachinePrecision], If[LessEqual[t$95$3, 2e+304], t$95$2, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x + \frac{y \cdot z}{t}\\
    t_2 := \frac{t\_1}{1 + a}\\
    t_3 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
    t_4 := \mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)\\
    \mathbf{if}\;t\_3 \leq -\infty:\\
    \;\;\;\;\frac{z}{t\_4} \cdot \frac{y}{t}\\
    
    \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-249}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_3 \leq 10^{-132}:\\
    \;\;\;\;\frac{x}{t\_4}\\
    
    \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+304}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{b \cdot y}\\
    
    
    \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 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
        13. lower-+.f6436.9

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
      4. Applied rewrites36.9%

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

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

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

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

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

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

          \[\leadsto \frac{z \cdot y}{\left(b \cdot \frac{y}{t} + \left(1 + a\right)\right) \cdot t} \]
        7. times-fracN/A

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

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

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

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

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

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

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

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

      if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.00000000000000011e-249 or 9.9999999999999999e-133 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

      1. Initial program 99.6%

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

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

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

      if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999999e-133

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6463.5

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites63.5%

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

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

      1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
        3. lower-*.f6479.2

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      7. Applied rewrites79.2%

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

    Alternative 5: 72.5% accurate, 0.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
        13. lower-+.f6436.9

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right) \cdot t} \]
      4. Applied rewrites36.9%

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

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

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

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, y, t \cdot \left(1 + a\right)\right)} \]
        3. lift-+.f6458.9

          \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, y, t \cdot \left(1 + a\right)\right)} \]
      7. Applied rewrites58.9%

        \[\leadsto \frac{z \cdot y}{\mathsf{fma}\left(b, \color{blue}{y}, t \cdot \left(1 + a\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))) < -2.00000000000000011e-249 or 9.9999999999999999e-133 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

      1. Initial program 99.6%

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

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

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

      if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999999e-133

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6463.5

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites63.5%

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

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

      1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
        3. lower-*.f6479.2

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      7. Applied rewrites79.2%

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

    Alternative 6: 71.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}}\\ t_3 := \frac{t\_1}{1 + a}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-249}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-132}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;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)))
            (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
            (t_3 (/ t_1 (+ 1.0 a))))
       (if (<= t_2 -2e-249)
         t_3
         (if (<= t_2 1e-132)
           (/ x (fma b (/ y t) (+ 1.0 a)))
           (if (<= t_2 2e+304) 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);
    	double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
    	double t_3 = t_1 / (1.0 + a);
    	double tmp;
    	if (t_2 <= -2e-249) {
    		tmp = t_3;
    	} else if (t_2 <= 1e-132) {
    		tmp = x / fma(b, (y / t), (1.0 + a));
    	} else if (t_2 <= 2e+304) {
    		tmp = t_3;
    	} 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)))
    	t_3 = Float64(t_1 / Float64(1.0 + a))
    	tmp = 0.0
    	if (t_2 <= -2e-249)
    		tmp = t_3;
    	elseif (t_2 <= 1e-132)
    		tmp = Float64(x / fma(b, Float64(y / t), Float64(1.0 + a)));
    	elseif (t_2 <= 2e+304)
    		tmp = t_3;
    	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]}, Block[{t$95$3 = N[(t$95$1 / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-249], t$95$3, If[LessEqual[t$95$2, 1e-132], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$3, 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}}\\
    t_3 := \frac{t\_1}{1 + a}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-249}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 10^{-132}:\\
    \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
    \;\;\;\;t\_3\\
    
    \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))) < -2.00000000000000011e-249 or 9.9999999999999999e-133 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

      1. Initial program 94.0%

        \[\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-+.f6471.8

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

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

      if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999999e-133

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6463.5

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites63.5%

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

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

      1. Initial program 11.6%

        \[\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-/.f6481.4

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

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

    Alternative 7: 70.7% 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}}\\ t_3 := \frac{t\_1}{1 + a}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-249}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-132}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{b \cdot y}\\ \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))))
            (t_3 (/ t_1 (+ 1.0 a))))
       (if (<= t_2 -2e-249)
         t_3
         (if (<= t_2 1e-132)
           (/ x (fma b (/ y t) (+ 1.0 a)))
           (if (<= t_2 2e+304) t_3 (+ (/ z b) (/ (* t x) (* b y))))))))
    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 t_3 = t_1 / (1.0 + a);
    	double tmp;
    	if (t_2 <= -2e-249) {
    		tmp = t_3;
    	} else if (t_2 <= 1e-132) {
    		tmp = x / fma(b, (y / t), (1.0 + a));
    	} else if (t_2 <= 2e+304) {
    		tmp = t_3;
    	} else {
    		tmp = (z / b) + ((t * x) / (b * y));
    	}
    	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)))
    	t_3 = Float64(t_1 / Float64(1.0 + a))
    	tmp = 0.0
    	if (t_2 <= -2e-249)
    		tmp = t_3;
    	elseif (t_2 <= 1e-132)
    		tmp = Float64(x / fma(b, Float64(y / t), Float64(1.0 + a)));
    	elseif (t_2 <= 2e+304)
    		tmp = t_3;
    	else
    		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(b * y)));
    	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]}, Block[{t$95$3 = N[(t$95$1 / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-249], t$95$3, If[LessEqual[t$95$2, 1e-132], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$3, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(b * y), $MachinePrecision]), $MachinePrecision]), $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}}\\
    t_3 := \frac{t\_1}{1 + a}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-249}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 10^{-132}:\\
    \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{b \cdot y}\\
    
    
    \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))) < -2.00000000000000011e-249 or 9.9999999999999999e-133 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

      1. Initial program 94.0%

        \[\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-+.f6471.8

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

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

      if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999999e-133

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6463.5

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites63.5%

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

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

      1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
        3. lower-*.f6479.2

          \[\leadsto \frac{z}{b} + \frac{t \cdot x}{b \cdot y} \]
      7. Applied rewrites79.2%

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

    Alternative 8: 69.5% 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}}\\ t_2 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-249}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-132}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;t\_2\\ \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 y (/ z t) x) (+ 1.0 a))))
       (if (<= t_1 -2e-249)
         t_2
         (if (<= t_1 1e-132)
           (/ x (fma b (/ y t) (+ 1.0 a)))
           (if (<= t_1 2e+304) t_2 (/ 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(y, (z / t), x) / (1.0 + a);
    	double tmp;
    	if (t_1 <= -2e-249) {
    		tmp = t_2;
    	} else if (t_1 <= 1e-132) {
    		tmp = x / fma(b, (y / t), (1.0 + a));
    	} else if (t_1 <= 2e+304) {
    		tmp = t_2;
    	} 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 = Float64(fma(y, Float64(z / t), x) / Float64(1.0 + a))
    	tmp = 0.0
    	if (t_1 <= -2e-249)
    		tmp = t_2;
    	elseif (t_1 <= 1e-132)
    		tmp = Float64(x / fma(b, Float64(y / t), Float64(1.0 + a)));
    	elseif (t_1 <= 2e+304)
    		tmp = t_2;
    	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[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-249], t$95$2, If[LessEqual[t$95$1, 1e-132], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+304], t$95$2, 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 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a}\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-249}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{-132}:\\
    \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
    \;\;\;\;t\_2\\
    
    \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))) < -2.00000000000000011e-249 or 9.9999999999999999e-133 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e304

      1. Initial program 94.0%

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a} \]
        6. lower-+.f6469.0

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

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

      if -2.00000000000000011e-249 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999999e-133

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6463.5

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites63.5%

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

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

      1. Initial program 11.6%

        \[\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-/.f6481.4

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

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

    Alternative 9: 65.2% accurate, 1.1× speedup?

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

      1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{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. lift-*.f6460.6

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

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

      if -1.05e16 < y < 4.79999999999999979e45

      1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1 + a\right)} \]
        9. lower-+.f6469.0

          \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)} \]
      4. Applied rewrites69.0%

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

    Alternative 10: 59.3% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{t \cdot x}{y}}{b}\\ \mathbf{if}\;y \leq -16500000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-71}:\\ \;\;\;\;\frac{x}{1 + a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (+ z (/ (* t x) y)) b)))
       (if (<= y -16500000000.0) t_1 (if (<= y 6e-71) (/ x (+ 1.0 a)) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (z + ((t * x) / y)) / b;
    	double tmp;
    	if (y <= -16500000000.0) {
    		tmp = t_1;
    	} else if (y <= 6e-71) {
    		tmp = x / (1.0 + a);
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_1
        real(8) :: tmp
        t_1 = (z + ((t * x) / y)) / b
        if (y <= (-16500000000.0d0)) then
            tmp = t_1
        else if (y <= 6d-71) then
            tmp = x / (1.0d0 + a)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (z + ((t * x) / y)) / b;
    	double tmp;
    	if (y <= -16500000000.0) {
    		tmp = t_1;
    	} else if (y <= 6e-71) {
    		tmp = x / (1.0 + a);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = (z + ((t * x) / y)) / b
    	tmp = 0
    	if y <= -16500000000.0:
    		tmp = t_1
    	elif y <= 6e-71:
    		tmp = x / (1.0 + a)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(z + Float64(Float64(t * x) / y)) / b)
    	tmp = 0.0
    	if (y <= -16500000000.0)
    		tmp = t_1;
    	elseif (y <= 6e-71)
    		tmp = Float64(x / Float64(1.0 + a));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = (z + ((t * x) / y)) / b;
    	tmp = 0.0;
    	if (y <= -16500000000.0)
    		tmp = t_1;
    	elseif (y <= 6e-71)
    		tmp = x / (1.0 + a);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -16500000000.0], t$95$1, If[LessEqual[y, 6e-71], N[(x / N[(1.0 + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{z + \frac{t \cdot x}{y}}{b}\\
    \mathbf{if}\;y \leq -16500000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 6 \cdot 10^{-71}:\\
    \;\;\;\;\frac{x}{1 + a}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.65e10 or 6.0000000000000003e-71 < y

      1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z + \frac{t \cdot x}{y}}{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. lift-*.f6456.5

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

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

      if -1.65e10 < y < 6.0000000000000003e-71

      1. Initial program 95.1%

        \[\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-+.f6462.6

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

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

    Alternative 11: 55.7% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 + a}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ x (+ 1.0 a))))
       (if (<= t -2.8e+27) t_1 (if (<= t 7.6e-18) (/ z b) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x / (1.0 + a);
    	double tmp;
    	if (t <= -2.8e+27) {
    		tmp = t_1;
    	} else if (t <= 7.6e-18) {
    		tmp = z / b;
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_1
        real(8) :: tmp
        t_1 = x / (1.0d0 + a)
        if (t <= (-2.8d+27)) then
            tmp = t_1
        else if (t <= 7.6d-18) then
            tmp = z / b
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x / (1.0 + a);
    	double tmp;
    	if (t <= -2.8e+27) {
    		tmp = t_1;
    	} else if (t <= 7.6e-18) {
    		tmp = z / b;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x / (1.0 + a)
    	tmp = 0
    	if t <= -2.8e+27:
    		tmp = t_1
    	elif t <= 7.6e-18:
    		tmp = z / b
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x / Float64(1.0 + a))
    	tmp = 0.0
    	if (t <= -2.8e+27)
    		tmp = t_1;
    	elseif (t <= 7.6e-18)
    		tmp = Float64(z / b);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x / (1.0 + a);
    	tmp = 0.0;
    	if (t <= -2.8e+27)
    		tmp = t_1;
    	elseif (t <= 7.6e-18)
    		tmp = z / b;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+27], t$95$1, If[LessEqual[t, 7.6e-18], N[(z / b), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x}{1 + a}\\
    \mathbf{if}\;t \leq -2.8 \cdot 10^{+27}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 7.6 \cdot 10^{-18}:\\
    \;\;\;\;\frac{z}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -2.7999999999999999e27 or 7.5999999999999996e-18 < t

      1. Initial program 81.6%

        \[\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-+.f6461.5

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

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

      if -2.7999999999999999e27 < t < 7.5999999999999996e-18

      1. Initial program 68.2%

        \[\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-/.f6450.3

          \[\leadsto \frac{z}{\color{blue}{b}} \]
      4. Applied rewrites50.3%

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

    Alternative 12: 41.8% accurate, 1.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+196}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+71}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= t -3.4e+196)
       (/ x 1.0)
       (if (<= t -1.2e+68) (/ x a) (if (<= t 8.2e+71) (/ z b) (/ x 1.0)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (t <= -3.4e+196) {
    		tmp = x / 1.0;
    	} else if (t <= -1.2e+68) {
    		tmp = x / a;
    	} else if (t <= 8.2e+71) {
    		tmp = z / b;
    	} else {
    		tmp = x / 1.0;
    	}
    	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 (t <= (-3.4d+196)) then
            tmp = x / 1.0d0
        else if (t <= (-1.2d+68)) then
            tmp = x / a
        else if (t <= 8.2d+71) then
            tmp = z / b
        else
            tmp = x / 1.0d0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (t <= -3.4e+196) {
    		tmp = x / 1.0;
    	} else if (t <= -1.2e+68) {
    		tmp = x / a;
    	} else if (t <= 8.2e+71) {
    		tmp = z / b;
    	} else {
    		tmp = x / 1.0;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if t <= -3.4e+196:
    		tmp = x / 1.0
    	elif t <= -1.2e+68:
    		tmp = x / a
    	elif t <= 8.2e+71:
    		tmp = z / b
    	else:
    		tmp = x / 1.0
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (t <= -3.4e+196)
    		tmp = Float64(x / 1.0);
    	elseif (t <= -1.2e+68)
    		tmp = Float64(x / a);
    	elseif (t <= 8.2e+71)
    		tmp = Float64(z / b);
    	else
    		tmp = Float64(x / 1.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (t <= -3.4e+196)
    		tmp = x / 1.0;
    	elseif (t <= -1.2e+68)
    		tmp = x / a;
    	elseif (t <= 8.2e+71)
    		tmp = z / b;
    	else
    		tmp = x / 1.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.4e+196], N[(x / 1.0), $MachinePrecision], If[LessEqual[t, -1.2e+68], N[(x / a), $MachinePrecision], If[LessEqual[t, 8.2e+71], N[(z / b), $MachinePrecision], N[(x / 1.0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq -3.4 \cdot 10^{+196}:\\
    \;\;\;\;\frac{x}{1}\\
    
    \mathbf{elif}\;t \leq -1.2 \cdot 10^{+68}:\\
    \;\;\;\;\frac{x}{a}\\
    
    \mathbf{elif}\;t \leq 8.2 \cdot 10^{+71}:\\
    \;\;\;\;\frac{z}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -3.4e196 or 8.2000000000000004e71 < t

      1. Initial program 81.3%

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a} \]
        6. lower-+.f6482.9

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

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

        \[\leadsto \frac{x}{\color{blue}{1} + a} \]
      6. Step-by-step derivation
        1. Applied rewrites68.9%

          \[\leadsto \frac{x}{\color{blue}{1} + a} \]
        2. Taylor expanded in a around inf

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

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

            \[\leadsto \frac{x}{a \cdot \left(1 + \frac{1}{\color{blue}{a}}\right)} \]
          3. lower-/.f6468.8

            \[\leadsto \frac{x}{a \cdot \left(1 + \frac{1}{a}\right)} \]
        4. Applied rewrites68.8%

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

          \[\leadsto \frac{x}{1} \]
        6. Step-by-step derivation
          1. Applied rewrites32.7%

            \[\leadsto \frac{x}{1} \]

          if -3.4e196 < t < -1.20000000000000004e68

          1. Initial program 81.0%

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a} \]
            6. lower-+.f6476.0

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

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

            \[\leadsto \frac{x}{\color{blue}{1} + a} \]
          6. Step-by-step derivation
            1. Applied rewrites59.0%

              \[\leadsto \frac{x}{\color{blue}{1} + a} \]
            2. Taylor expanded in a around inf

              \[\leadsto \frac{x}{a} \]
            3. Step-by-step derivation
              1. Applied rewrites34.1%

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

              if -1.20000000000000004e68 < t < 8.2000000000000004e71

              1. Initial program 70.6%

                \[\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-/.f6446.7

                  \[\leadsto \frac{z}{\color{blue}{b}} \]
              4. Applied rewrites46.7%

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

            Alternative 13: 41.5% accurate, 2.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+183}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{+78}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (<= a -1.85e+183) (/ x a) (if (<= a 1.75e+78) (/ z b) (/ x a))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if (a <= -1.85e+183) {
            		tmp = x / a;
            	} else if (a <= 1.75e+78) {
            		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 <= (-1.85d+183)) then
                    tmp = x / a
                else if (a <= 1.75d+78) 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 <= -1.85e+183) {
            		tmp = x / a;
            	} else if (a <= 1.75e+78) {
            		tmp = z / b;
            	} else {
            		tmp = x / a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if a <= -1.85e+183:
            		tmp = x / a
            	elif a <= 1.75e+78:
            		tmp = z / b
            	else:
            		tmp = x / a
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if (a <= -1.85e+183)
            		tmp = Float64(x / a);
            	elseif (a <= 1.75e+78)
            		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 <= -1.85e+183)
            		tmp = x / a;
            	elseif (a <= 1.75e+78)
            		tmp = z / b;
            	else
            		tmp = x / a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.85e+183], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.75e+78], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq -1.85 \cdot 10^{+183}:\\
            \;\;\;\;\frac{x}{a}\\
            
            \mathbf{elif}\;a \leq 1.75 \cdot 10^{+78}:\\
            \;\;\;\;\frac{z}{b}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{x}{a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < -1.8500000000000001e183 or 1.7500000000000001e78 < a

              1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x}{\color{blue}{1} + a} \]
              6. Step-by-step derivation
                1. Applied rewrites52.8%

                  \[\leadsto \frac{x}{\color{blue}{1} + a} \]
                2. Taylor expanded in a around inf

                  \[\leadsto \frac{x}{a} \]
                3. Step-by-step derivation
                  1. Applied rewrites52.8%

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

                  if -1.8500000000000001e183 < a < 1.7500000000000001e78

                  1. Initial program 75.0%

                    \[\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-/.f6437.3

                      \[\leadsto \frac{z}{\color{blue}{b}} \]
                  4. Applied rewrites37.3%

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

                Alternative 14: 34.2% accurate, 5.8× speedup?

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

                  \[\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-/.f6434.2

                    \[\leadsto \frac{z}{\color{blue}{b}} \]
                4. Applied rewrites34.2%

                  \[\leadsto \color{blue}{\frac{z}{b}} \]
                5. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025101 
                (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))))