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

Percentage Accurate: 75.1% → 89.7%
Time: 6.4s
Alternatives: 17
Speedup: 0.8×

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 17 alternatives:

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

Initial Program: 75.1% 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: 89.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.49999999999999995e-10 < t < 1.09999999999999998e-93

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999998e-93 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

Alternative 2: 89.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.4e-16 < t < 1.09999999999999998e-93

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999998e-93 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

Alternative 3: 89.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000002e-15 < t < 1.09999999999999998e-93

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999998e-93 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

Alternative 4: 88.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0000000000000002e-15 or 1.09999999999999998e-93 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000002e-15 < t < 1.09999999999999998e-93

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(b, \frac{y}{t}, a - -1\right)}\\

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


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

    1. Initial program 75.1%

      \[\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. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{t \cdot \left(y \cdot z\right)}{\mathsf{fma}\left(b, y, t \cdot \left(1 + a\right)\right)}}}{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.00000000000000012e279

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-96}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, x, y \cdot z\right)}{t + b \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.9999999999999999e-66 or 9e-96 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999999e-66 < t < 9e-96

    1. Initial program 75.1%

      \[\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. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(t, x, y \cdot z\right)}{t + \color{blue}{b \cdot y}} \]
      5. lower-*.f6448.6

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

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

Alternative 7: 73.9% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 75.1%

      \[\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. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\mathsf{fma}\left(b, 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))) < -1.99999999999999994e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000012e279

    1. Initial program 75.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 \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6456.8

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

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

    if -1.99999999999999994e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0 or 2.00000000000000012e279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 72.4% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 75.1%

      \[\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. mult-flipN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(t, x, y \cdot z\right)}{a}}{t} \]
      3. lower-*.f6428.7

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999994e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000012e279

    1. Initial program 75.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 \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    3. Step-by-step derivation
      1. lower-+.f6456.8

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

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

    if -1.99999999999999994e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0 or 2.00000000000000012e279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 67.4% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.4e5 or 8.1000000000000003e74 < t

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\color{blue}{1 + a}} \]
    5. Step-by-step derivation
      1. lower-+.f6456.7

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

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

    if -1.4e5 < t < 8.1000000000000003e74

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 64.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -800000:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \frac{t}{y}, z\right)}{b}\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a - -1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8e5

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \frac{t}{y}, z\right)}{b} \]
    8. Applied rewrites41.1%

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

    if -8e5 < y < 5.7999999999999996e87

    1. Initial program 75.1%

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

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

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

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

        \[\leadsto \frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)} \]
    4. Applied rewrites51.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, a - -1\right)} \]
      8. lift--.f6453.2

        \[\leadsto \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a - -1\right)} \]
    7. Applied rewrites53.2%

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

    if 5.7999999999999996e87 < y

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -500000:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \frac{t}{y}, z\right)}{b}\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{a - -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5e5

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \frac{t}{y}, z\right)}{b} \]
    8. Applied rewrites41.1%

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

    if -5e5 < y < 2.3000000000000001e26

    1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

    if 2.3000000000000001e26 < y

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{a - -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5e5 or 2.3000000000000001e26 < y

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \frac{t}{y}, z\right)}{b} \]
    8. Applied rewrites41.1%

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

    if -5e5 < y < 2.3000000000000001e26

    1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

Alternative 13: 59.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_2 := \frac{x}{a - -1}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{z}{t}}{b}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\ \;\;\;\;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 (/ x (- a -1.0))))
   (if (<= t_1 (- INFINITY))
     (/ z b)
     (if (<= t_1 -2e-304)
       t_2
       (if (<= t_1 0.0)
         (/ (* t (/ z t)) b)
         (if (<= t_1 5e+264) 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 = x / (a - -1.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z / b;
	} else if (t_1 <= -2e-304) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (t * (z / t)) / b;
	} else if (t_1 <= 5e+264) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_2 = x / (a - -1.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z / b;
	} else if (t_1 <= -2e-304) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = (t * (z / t)) / b;
	} else if (t_1 <= 5e+264) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
	t_2 = x / (a - -1.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z / b
	elif t_1 <= -2e-304:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = (t * (z / t)) / b
	elif t_1 <= 5e+264:
		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(x / Float64(a - -1.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z / b);
	elseif (t_1 <= -2e-304)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(t * Float64(z / t)) / b);
	elseif (t_1 <= 5e+264)
		tmp = t_2;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	t_2 = x / (a - -1.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z / b;
	elseif (t_1 <= -2e-304)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = (t * (z / t)) / b;
	elseif (t_1 <= 5e+264)
		tmp = t_2;
	else
		tmp = z / b;
	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]}, Block[{t$95$2 = N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -2e-304], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[(z / t), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+264], 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{x}{a - -1}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{z}{t}}{b}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\
\;\;\;\;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))) < -inf.0 or 5.00000000000000033e264 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 75.1%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999994e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000033e264

    1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

    if -1.99999999999999994e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 75.1%

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y} \]
      6. lower-*.f6425.3

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \frac{x + \frac{y \cdot z}{t}}{y}}{b} \]
      8. lower-/.f6426.7

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{y}}{b} \]
      16. lower-/.f6428.2

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

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

      \[\leadsto \frac{t \cdot \frac{z}{t}}{b} \]
    8. Step-by-step derivation
      1. lower-/.f6428.2

        \[\leadsto \frac{t \cdot \frac{z}{t}}{b} \]
    9. Applied rewrites28.2%

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

Alternative 14: 58.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_2 := \frac{x}{a - -1}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\ \;\;\;\;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 (/ x (- a -1.0))))
   (if (<= t_1 (- INFINITY))
     (/ z b)
     (if (<= t_1 -2e-304)
       t_2
       (if (<= t_1 0.0) (/ z b) (if (<= t_1 5e+264) 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 = x / (a - -1.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z / b;
	} else if (t_1 <= -2e-304) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = z / b;
	} else if (t_1 <= 5e+264) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_2 = x / (a - -1.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z / b;
	} else if (t_1 <= -2e-304) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = z / b;
	} else if (t_1 <= 5e+264) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
	t_2 = x / (a - -1.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z / b
	elif t_1 <= -2e-304:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = z / b
	elif t_1 <= 5e+264:
		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(x / Float64(a - -1.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z / b);
	elseif (t_1 <= -2e-304)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(z / b);
	elseif (t_1 <= 5e+264)
		tmp = t_2;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	t_2 = x / (a - -1.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z / b;
	elseif (t_1 <= -2e-304)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = z / b;
	elseif (t_1 <= 5e+264)
		tmp = t_2;
	else
		tmp = z / b;
	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]}, Block[{t$95$2 = N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -2e-304], t$95$2, If[LessEqual[t$95$1, 0.0], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+264], 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{x}{a - -1}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+264}:\\
\;\;\;\;t\_2\\

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


\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))) < -inf.0 or -1.99999999999999994e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0 or 5.00000000000000033e264 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 75.1%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999994e-304 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000033e264

    1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

Alternative 15: 44.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+41}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-278}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq 10^{-112}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{elif}\;t\_1 \leq 10^{+112}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t\_1 \leq 10^{+253}:\\ \;\;\;\;\frac{x}{1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (/ z b)
     (if (<= t_1 -1e+41)
       (/ x 1.0)
       (if (<= t_1 -2e-304)
         (/ x a)
         (if (<= t_1 4e-278)
           (/ z b)
           (if (<= t_1 1e-112)
             (/ x 1.0)
             (if (<= t_1 1e+112)
               (/ x a)
               (if (<= t_1 1e+253) (/ x 1.0) (/ z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z / b;
	} else if (t_1 <= -1e+41) {
		tmp = x / 1.0;
	} else if (t_1 <= -2e-304) {
		tmp = x / a;
	} else if (t_1 <= 4e-278) {
		tmp = z / b;
	} else if (t_1 <= 1e-112) {
		tmp = x / 1.0;
	} else if (t_1 <= 1e+112) {
		tmp = x / a;
	} else if (t_1 <= 1e+253) {
		tmp = x / 1.0;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z / b;
	} else if (t_1 <= -1e+41) {
		tmp = x / 1.0;
	} else if (t_1 <= -2e-304) {
		tmp = x / a;
	} else if (t_1 <= 4e-278) {
		tmp = z / b;
	} else if (t_1 <= 1e-112) {
		tmp = x / 1.0;
	} else if (t_1 <= 1e+112) {
		tmp = x / a;
	} else if (t_1 <= 1e+253) {
		tmp = x / 1.0;
	} else {
		tmp = z / b;
	}
	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 <= -math.inf:
		tmp = z / b
	elif t_1 <= -1e+41:
		tmp = x / 1.0
	elif t_1 <= -2e-304:
		tmp = x / a
	elif t_1 <= 4e-278:
		tmp = z / b
	elif t_1 <= 1e-112:
		tmp = x / 1.0
	elif t_1 <= 1e+112:
		tmp = x / a
	elif t_1 <= 1e+253:
		tmp = x / 1.0
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z / b);
	elseif (t_1 <= -1e+41)
		tmp = Float64(x / 1.0);
	elseif (t_1 <= -2e-304)
		tmp = Float64(x / a);
	elseif (t_1 <= 4e-278)
		tmp = Float64(z / b);
	elseif (t_1 <= 1e-112)
		tmp = Float64(x / 1.0);
	elseif (t_1 <= 1e+112)
		tmp = Float64(x / a);
	elseif (t_1 <= 1e+253)
		tmp = Float64(x / 1.0);
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z / b;
	elseif (t_1 <= -1e+41)
		tmp = x / 1.0;
	elseif (t_1 <= -2e-304)
		tmp = x / a;
	elseif (t_1 <= 4e-278)
		tmp = z / b;
	elseif (t_1 <= 1e-112)
		tmp = x / 1.0;
	elseif (t_1 <= 1e+112)
		tmp = x / a;
	elseif (t_1 <= 1e+253)
		tmp = x / 1.0;
	else
		tmp = z / b;
	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, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e+41], N[(x / 1.0), $MachinePrecision], If[LessEqual[t$95$1, -2e-304], N[(x / a), $MachinePrecision], If[LessEqual[t$95$1, 4e-278], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 1e-112], N[(x / 1.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+112], N[(x / a), $MachinePrecision], If[LessEqual[t$95$1, 1e+253], N[(x / 1.0), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{1}\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-304}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-278}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t\_1 \leq 10^{-112}:\\
\;\;\;\;\frac{x}{1}\\

\mathbf{elif}\;t\_1 \leq 10^{+112}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;t\_1 \leq 10^{+253}:\\
\;\;\;\;\frac{x}{1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or -1.99999999999999994e-304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.99999999999999975e-278 or 9.9999999999999994e252 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 75.1%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.00000000000000001e41 or 3.99999999999999975e-278 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999995e-113 or 9.9999999999999993e111 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999994e252

    1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{a - -1}} \]
    7. Taylor expanded in a around 0

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

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

      if -1.00000000000000001e41 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999994e-304 or 9.9999999999999995e-113 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999993e111

      1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 41.4% accurate, 2.1× speedup?

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

      1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

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

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

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

      if -0.340000000000000024 < a < 1

      1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{a - -1}} \]
      7. Taylor expanded in a around 0

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

          \[\leadsto \frac{x}{1} \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 17: 25.9% accurate, 5.8× speedup?

      \[\begin{array}{l} \\ \frac{x}{a} \end{array} \]
      (FPCore (x y z t a b) :precision binary64 (/ x a))
      double code(double x, double y, double z, double t, double a, double b) {
      	return x / a;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          code = x / a
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return x / a;
      }
      
      def code(x, y, z, t, a, b):
      	return x / a
      
      function code(x, y, z, t, a, b)
      	return Float64(x / a)
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = x / a;
      end
      
      code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{x}{a}
      \end{array}
      
      Derivation
      1. Initial program 75.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-+.f6442.0

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

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

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

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

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

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

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

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

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

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

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

      Reproduce

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