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

Percentage Accurate: 75.3% → 89.0%
Time: 7.2s
Alternatives: 20
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 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.3% 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.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(\frac{y}{t}, b, a + 1\right)}\\

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


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

    1. Initial program 12.6%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    6. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{t \cdot \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    11. Applied rewrites69.6%

      \[\leadsto z \cdot \frac{y}{\color{blue}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\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))) < 3.9999999999999999e268

    1. Initial program 91.4%

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

    if 3.9999999999999999e268 < (/.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 14.0%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right) \]
      6. lower-/.f64100.0

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \color{blue}{\frac{x}{y}}, \frac{z}{b}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.6%

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

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

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

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(\frac{y}{t}, b, a + 1\right)}\\

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


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

    1. Initial program 12.6%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    6. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{t \cdot \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    11. Applied rewrites69.6%

      \[\leadsto z \cdot \frac{y}{\color{blue}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\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))) < 3.9999999999999999e268

    1. Initial program 91.4%

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

    if 3.9999999999999999e268 < (/.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 14.0%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right) \]
      6. lower-/.f64100.0

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \color{blue}{\frac{x}{y}}, \frac{z}{b}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification87.6%

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

Alternative 3: 83.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)\\ t_2 := 1 + \left(a + \frac{b \cdot y}{t}\right)\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{-176} \lor \neg \left(t \leq 2.35 \cdot 10^{-106}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t\_1}, \frac{x}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma b (/ y t) (+ 1.0 a))) (t_2 (+ 1.0 (+ a (/ (* b y) t)))))
   (if (or (<= t -1.5e-176) (not (<= t 2.35e-106)))
     (fma (/ y t) (/ z t_1) (/ x t_1))
     (* z (+ (/ x (* z t_2)) (/ y (* t t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(b, (y / t), (1.0 + a));
	double t_2 = 1.0 + (a + ((b * y) / t));
	double tmp;
	if ((t <= -1.5e-176) || !(t <= 2.35e-106)) {
		tmp = fma((y / t), (z / t_1), (x / t_1));
	} else {
		tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(b, Float64(y / t), Float64(1.0 + a))
	t_2 = Float64(1.0 + Float64(a + Float64(Float64(b * y) / t)))
	tmp = 0.0
	if ((t <= -1.5e-176) || !(t <= 2.35e-106))
		tmp = fma(Float64(y / t), Float64(z / t_1), Float64(x / t_1));
	else
		tmp = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + N[(N[(b * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1.5e-176], N[Not[LessEqual[t, 2.35e-106]], $MachinePrecision]], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)\\
t_2 := 1 + \left(a + \frac{b \cdot y}{t}\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-176} \lor \neg \left(t \leq 2.35 \cdot 10^{-106}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t\_1}, \frac{x}{t\_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5e-176 or 2.3499999999999999e-106 < t

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e-176 < t < 2.3499999999999999e-106

    1. Initial program 67.7%

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

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

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    5. Applied rewrites54.3%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    6. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 78.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -7 \cdot 10^{-217}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5999999999999994e-136 or 3.69999999999999977e-249 < t

    1. Initial program 83.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999994e-136 < t < -7e-217

    1. Initial program 76.8%

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

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

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    5. Applied rewrites40.6%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    6. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y}{t \cdot \color{blue}{\left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    11. Applied rewrites75.7%

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

    if -7e-217 < t < 3.69999999999999977e-249

    1. Initial program 53.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right) \cdot t}{b \cdot y} \]
      8. lower-*.f6440.4

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right) \]
      6. lower-/.f6473.0

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

      \[\leadsto \mathsf{fma}\left(\frac{t}{b}, \color{blue}{\frac{x}{y}}, \frac{z}{b}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{-136}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-217}:\\ \;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-249}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ \mathbf{if}\;a \leq -12.2:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}\\ \mathbf{elif}\;a \leq 1.6:\\ \;\;\;\;\frac{t\_1}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y z) t))))
   (if (<= a -12.2)
     (/ (fma y (/ z t) x) (fma b (/ y t) a))
     (if (<= a 1.6) (/ t_1 (fma b (/ y t) 1.0)) (/ t_1 (fma y (/ b t) a))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((y * z) / t);
	double tmp;
	if (a <= -12.2) {
		tmp = fma(y, (z / t), x) / fma(b, (y / t), a);
	} else if (a <= 1.6) {
		tmp = t_1 / fma(b, (y / t), 1.0);
	} else {
		tmp = t_1 / fma(y, (b / t), a);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(y * z) / t))
	tmp = 0.0
	if (a <= -12.2)
		tmp = Float64(fma(y, Float64(z / t), x) / fma(b, Float64(y / t), a));
	elseif (a <= 1.6)
		tmp = Float64(t_1 / fma(b, Float64(y / t), 1.0));
	else
		tmp = Float64(t_1 / fma(y, Float64(b / t), a));
	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]}, If[LessEqual[a, -12.2], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6], N[(t$95$1 / N[(b * N[(y / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -12.199999999999999

    1. Initial program 78.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -12.199999999999999 < a < 1.6000000000000001

    1. Initial program 79.6%

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

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

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

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

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

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

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

    if 1.6000000000000001 < a

    1. Initial program 82.8%

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 72.1% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -12.199999999999999

    1. Initial program 78.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -12.199999999999999 < a < 7.6000000000000004e-14

    1. Initial program 79.0%

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

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

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

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

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

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

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

    if 7.6000000000000004e-14 < a

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 72.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -12.199999999999999

    1. Initial program 78.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -12.199999999999999 < a < 8.50000000000000038e-14

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.50000000000000038e-14 < a

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 69.4% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -12.199999999999999

    1. Initial program 78.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -12.199999999999999 < a < 1.35e16

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(b, \color{blue}{\frac{y}{t}}, 1\right)} \]
      9. lower-/.f6476.2

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(b, \frac{y}{\color{blue}{t}}, 1\right)} \]
    5. Applied rewrites76.2%

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

    if 1.35e16 < a

    1. Initial program 83.5%

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6422.0

        \[\leadsto \frac{z}{\color{blue}{b}} \]
    5. Applied rewrites22.0%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    6. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \left(\frac{x}{z} + \frac{y}{t}\right)}{a} \]
      5. lift-/.f6474.7

        \[\leadsto \frac{z \cdot \left(\frac{x}{z} + \frac{y}{t}\right)}{a} \]
    11. Applied rewrites74.7%

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

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

Alternative 9: 69.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+17} \lor \neg \left(y \leq 2.25 \cdot 10^{+64}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -2.7e+17) (not (<= y 2.25e+64)))
   (fma (/ t b) (/ x y) (/ z b))
   (/ (+ x (/ (* y z) t)) (+ 1.0 a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -2.7e+17) || !(y <= 2.25e+64)) {
		tmp = fma((t / b), (x / y), (z / b));
	} else {
		tmp = (x + ((y * z) / t)) / (1.0 + a);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -2.7e+17) || !(y <= 2.25e+64))
		tmp = fma(Float64(t / b), Float64(x / y), Float64(z / b));
	else
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + a));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.7e+17], N[Not[LessEqual[y, 2.25e+64]], $MachinePrecision]], N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+17} \lor \neg \left(y \leq 2.25 \cdot 10^{+64}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{b}, \frac{x}{y}, \frac{z}{b}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7e17 or 2.24999999999999987e64 < y

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e17 < y < 2.24999999999999987e64

    1. Initial program 97.5%

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

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

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

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

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

Alternative 10: 68.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-42} \lor \neg \left(t \leq 4.8 \cdot 10^{+36}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -1.45e-42) (not (<= t 4.8e+36)))
   (/ (fma y (/ z t) x) (+ 1.0 a))
   (/ (+ z (/ (* t x) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.45e-42) || !(t <= 4.8e+36)) {
		tmp = fma(y, (z / t), x) / (1.0 + a);
	} else {
		tmp = (z + ((t * x) / y)) / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.45e-42) || !(t <= 4.8e+36))
		tmp = Float64(fma(y, Float64(z / t), x) / Float64(1.0 + a));
	else
		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.45e-42], N[Not[LessEqual[t, 4.8e+36]], $MachinePrecision]], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-42} \lor \neg \left(t \leq 4.8 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.4500000000000001e-42 or 4.79999999999999985e36 < t

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

    if -1.4500000000000001e-42 < t < 4.79999999999999985e36

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      4. lift-*.f6457.6

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

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

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

Alternative 11: 65.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-37} \lor \neg \left(t \leq 1.22 \cdot 10^{-60}\right):\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\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 (or (<= t -2.8e-37) (not (<= t 1.22e-60)))
   (/ x (fma b (/ y t) (+ 1.0 a)))
   (/ (+ z (/ (* t x) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -2.8e-37) || !(t <= 1.22e-60)) {
		tmp = x / fma(b, (y / t), (1.0 + a));
	} else {
		tmp = (z + ((t * x) / y)) / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -2.8e-37) || !(t <= 1.22e-60))
		tmp = Float64(x / fma(b, Float64(y / t), Float64(1.0 + a)));
	else
		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.8e-37], N[Not[LessEqual[t, 1.22e-60]], $MachinePrecision]], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(1.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-37} \lor \neg \left(t \leq 1.22 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1 + a\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8000000000000001e-37 or 1.22e-60 < t

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-37 < t < 1.22e-60

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      4. lift-*.f6458.9

        \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
    8. Applied rewrites58.9%

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

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

Alternative 12: 66.1% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 88.6%

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

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

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

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

    if -3.3000000000000002e-171 < t < 4.79999999999999985e36

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      4. lift-*.f6461.2

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

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

    if 4.79999999999999985e36 < t

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.5%

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

Alternative 13: 59.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-16} \lor \neg \left(t \leq 6.5 \cdot 10^{+36}\right):\\ \;\;\;\;\frac{x}{1 + a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t \cdot x}{y}}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -1.6e-16) (not (<= t 6.5e+36)))
   (/ x (+ 1.0 a))
   (/ (+ z (/ (* t x) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.6e-16) || !(t <= 6.5e+36)) {
		tmp = x / (1.0 + a);
	} else {
		tmp = (z + ((t * x) / y)) / b;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-1.6d-16)) .or. (.not. (t <= 6.5d+36))) then
        tmp = x / (1.0d0 + a)
    else
        tmp = (z + ((t * x) / y)) / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.6e-16) || !(t <= 6.5e+36)) {
		tmp = x / (1.0 + a);
	} else {
		tmp = (z + ((t * x) / y)) / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -1.6e-16) or not (t <= 6.5e+36):
		tmp = x / (1.0 + a)
	else:
		tmp = (z + ((t * x) / y)) / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.6e-16) || !(t <= 6.5e+36))
		tmp = Float64(x / Float64(1.0 + a));
	else
		tmp = Float64(Float64(z + Float64(Float64(t * x) / y)) / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -1.6e-16) || ~((t <= 6.5e+36)))
		tmp = x / (1.0 + a);
	else
		tmp = (z + ((t * x) / y)) / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.6e-16], N[Not[LessEqual[t, 6.5e+36]], $MachinePrecision]], N[(x / N[(1.0 + a), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-16} \lor \neg \left(t \leq 6.5 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{x}{1 + a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.60000000000000011e-16 or 6.4999999999999998e36 < t

    1. Initial program 85.3%

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

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

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

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

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

    if -1.60000000000000011e-16 < t < 6.4999999999999998e36

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \frac{t \cdot x}{y}}{b} \]
      4. lift-*.f6456.6

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

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

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

Alternative 14: 56.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(\frac{y}{t}, b, 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -28.0) (not (<= a 240.0)))
   (/ (fma y (/ z t) x) a)
   (/ x (fma (/ y t) b 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -28.0) || !(a <= 240.0)) {
		tmp = fma(y, (z / t), x) / a;
	} else {
		tmp = x / fma((y / t), b, 1.0);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -28.0) || !(a <= 240.0))
		tmp = Float64(fma(y, Float64(z / t), x) / a);
	else
		tmp = Float64(x / fma(Float64(y / t), b, 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -28.0], N[Not[LessEqual[a, 240.0]], $MachinePrecision]], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(N[(y / t), $MachinePrecision] * b + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -28 or 240 < a

    1. Initial program 80.5%

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a} \]
      5. lower-/.f6467.2

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

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

    if -28 < a < 240

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x}{\frac{\color{blue}{b \cdot y}}{t} + 1} \]
          6. associate-*r/N/A

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

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

            \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(\frac{y}{t}, b, 1\right)}} \]
          9. lift-/.f6452.9

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

          \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(\frac{y}{t}, b, 1\right)}} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification59.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(\frac{y}{t}, b, 1\right)}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 15: 55.9% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(\frac{b}{t}, y, 1\right)}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (or (<= a -28.0) (not (<= a 240.0)))
         (/ (fma y (/ z t) x) a)
         (/ x (fma (/ b t) y 1.0))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if ((a <= -28.0) || !(a <= 240.0)) {
      		tmp = fma(y, (z / t), x) / a;
      	} else {
      		tmp = x / fma((b / t), y, 1.0);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if ((a <= -28.0) || !(a <= 240.0))
      		tmp = Float64(fma(y, Float64(z / t), x) / a);
      	else
      		tmp = Float64(x / fma(Float64(b / t), y, 1.0));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -28.0], N[Not[LessEqual[a, 240.0]], $MachinePrecision]], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(N[(b / t), $MachinePrecision] * y + 1.0), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\
      \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\mathsf{fma}\left(\frac{b}{t}, y, 1\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -28 or 240 < a

        1. Initial program 80.5%

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a} \]
          5. lower-/.f6467.2

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

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

        if -28 < a < 240

        1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x}{\color{blue}{y \cdot \frac{b}{t}} + 1} \]
              6. *-commutativeN/A

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

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

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

              \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(\frac{b}{t}, y, 1\right)}} \]
          4. Recombined 2 regimes into one program.
          5. Final simplification59.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -28 \lor \neg \left(a \leq 240\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(\frac{b}{t}, y, 1\right)}\\ \end{array} \]
          6. Add Preprocessing

          Alternative 16: 53.1% accurate, 1.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-140} \lor \neg \left(t \leq 6.8 \cdot 10^{-57}\right):\\ \;\;\;\;\frac{x}{1 + a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, z \cdot y\right)}{b \cdot y}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= t -3.7e-140) (not (<= t 6.8e-57)))
             (/ x (+ 1.0 a))
             (/ (fma x t (* z y)) (* b y))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((t <= -3.7e-140) || !(t <= 6.8e-57)) {
          		tmp = x / (1.0 + a);
          	} else {
          		tmp = fma(x, t, (z * y)) / (b * y);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((t <= -3.7e-140) || !(t <= 6.8e-57))
          		tmp = Float64(x / Float64(1.0 + a));
          	else
          		tmp = Float64(fma(x, t, Float64(z * y)) / Float64(b * y));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.7e-140], N[Not[LessEqual[t, 6.8e-57]], $MachinePrecision]], N[(x / N[(1.0 + a), $MachinePrecision]), $MachinePrecision], N[(N[(x * t + N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(b * y), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -3.7 \cdot 10^{-140} \lor \neg \left(t \leq 6.8 \cdot 10^{-57}\right):\\
          \;\;\;\;\frac{x}{1 + a}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(x, t, z \cdot y\right)}{b \cdot y}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -3.69999999999999977e-140 or 6.80000000000000032e-57 < t

            1. Initial program 83.7%

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

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

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

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

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

            if -3.69999999999999977e-140 < t < 6.80000000000000032e-57

            1. Initial program 71.7%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right) \cdot t}{b \cdot y} \]
              8. lower-*.f6444.8

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(x, t, z \cdot y\right)}{b \cdot y} \]
              4. lower-*.f6459.8

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

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

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

          Alternative 17: 56.2% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+17} \lor \neg \left(y \leq 5.8 \cdot 10^{+63}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + a}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= y -2.4e+17) (not (<= y 5.8e+63))) (/ z b) (/ x (+ 1.0 a))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((y <= -2.4e+17) || !(y <= 5.8e+63)) {
          		tmp = z / b;
          	} else {
          		tmp = x / (1.0 + 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 ((y <= (-2.4d+17)) .or. (.not. (y <= 5.8d+63))) then
                  tmp = z / b
              else
                  tmp = x / (1.0d0 + 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 ((y <= -2.4e+17) || !(y <= 5.8e+63)) {
          		tmp = z / b;
          	} else {
          		tmp = x / (1.0 + a);
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (y <= -2.4e+17) or not (y <= 5.8e+63):
          		tmp = z / b
          	else:
          		tmp = x / (1.0 + a)
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((y <= -2.4e+17) || !(y <= 5.8e+63))
          		tmp = Float64(z / b);
          	else
          		tmp = Float64(x / Float64(1.0 + a));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((y <= -2.4e+17) || ~((y <= 5.8e+63)))
          		tmp = z / b;
          	else
          		tmp = x / (1.0 + a);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.4e+17], N[Not[LessEqual[y, 5.8e+63]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -2.4 \cdot 10^{+17} \lor \neg \left(y \leq 5.8 \cdot 10^{+63}\right):\\
          \;\;\;\;\frac{z}{b}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{1 + a}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -2.4e17 or 5.7999999999999999e63 < y

            1. Initial program 51.9%

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

              \[\leadsto \color{blue}{\frac{z}{b}} \]
            4. Step-by-step derivation
              1. lower-/.f6449.2

                \[\leadsto \frac{z}{\color{blue}{b}} \]
            5. Applied rewrites49.2%

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

            if -2.4e17 < y < 5.7999999999999999e63

            1. Initial program 97.5%

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

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

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

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

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

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

          Alternative 18: 41.0% accurate, 2.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) (/ x 1.0)))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((a <= -1.0) || !(a <= 1.0)) {
          		tmp = x / a;
          	} else {
          		tmp = x / 1.0;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: tmp
              if ((a <= (-1.0d0)) .or. (.not. (a <= 1.0d0))) then
                  tmp = x / a
              else
                  tmp = x / 1.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((a <= -1.0) || !(a <= 1.0)) {
          		tmp = x / a;
          	} else {
          		tmp = x / 1.0;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (a <= -1.0) or not (a <= 1.0):
          		tmp = x / a
          	else:
          		tmp = x / 1.0
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((a <= -1.0) || !(a <= 1.0))
          		tmp = Float64(x / a);
          	else
          		tmp = Float64(x / 1.0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((a <= -1.0) || ~((a <= 1.0)))
          		tmp = x / a;
          	else
          		tmp = x / 1.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(x / 1.0), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
          \;\;\;\;\frac{x}{a}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{1}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -1 or 1 < a

            1. Initial program 79.9%

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

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

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

                \[\leadsto \frac{x}{\color{blue}{a}} \]
              3. Step-by-step derivation
                1. Applied rewrites49.5%

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

                if -1 < a < 1

                1. Initial program 80.2%

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

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

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

                    \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
                  3. Step-by-step derivation
                    1. lift-+.f6442.3

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

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

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

                      \[\leadsto \frac{x}{1} \]
                  7. Recombined 2 regimes into one program.
                  8. Final simplification44.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1}\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 19: 42.9% accurate, 2.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -11800 \lor \neg \left(a \leq 6 \cdot 10^{+25}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (or (<= a -11800.0) (not (<= a 6e+25))) (/ x a) (/ z b)))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((a <= -11800.0) || !(a <= 6e+25)) {
                  		tmp = x / a;
                  	} else {
                  		tmp = z / b;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: tmp
                      if ((a <= (-11800.0d0)) .or. (.not. (a <= 6d+25))) then
                          tmp = x / a
                      else
                          tmp = z / b
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if ((a <= -11800.0) || !(a <= 6e+25)) {
                  		tmp = x / a;
                  	} else {
                  		tmp = z / b;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	tmp = 0
                  	if (a <= -11800.0) or not (a <= 6e+25):
                  		tmp = x / a
                  	else:
                  		tmp = z / b
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if ((a <= -11800.0) || !(a <= 6e+25))
                  		tmp = Float64(x / a);
                  	else
                  		tmp = Float64(z / b);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	tmp = 0.0;
                  	if ((a <= -11800.0) || ~((a <= 6e+25)))
                  		tmp = x / a;
                  	else
                  		tmp = z / b;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -11800.0], N[Not[LessEqual[a, 6e+25]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -11800 \lor \neg \left(a \leq 6 \cdot 10^{+25}\right):\\
                  \;\;\;\;\frac{x}{a}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{z}{b}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if a < -11800 or 6.00000000000000011e25 < a

                    1. Initial program 80.6%

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

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

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

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

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

                        if -11800 < a < 6.00000000000000011e25

                        1. Initial program 79.6%

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

                          \[\leadsto \color{blue}{\frac{z}{b}} \]
                        4. Step-by-step derivation
                          1. lower-/.f6434.0

                            \[\leadsto \frac{z}{\color{blue}{b}} \]
                        5. Applied rewrites34.0%

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

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

                      Alternative 20: 34.0% accurate, 4.4× speedup?

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

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

                        \[\leadsto \color{blue}{\frac{z}{b}} \]
                      4. Step-by-step derivation
                        1. lower-/.f6427.7

                          \[\leadsto \frac{z}{\color{blue}{b}} \]
                      5. Applied rewrites27.7%

                        \[\leadsto \color{blue}{\frac{z}{b}} \]
                      6. Final simplification27.7%

                        \[\leadsto \frac{z}{b} \]
                      7. Add Preprocessing

                      Reproduce

                      ?
                      herbie shell --seed 2025085 
                      (FPCore (x y z t a b)
                        :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
                        :precision binary64
                      
                        :alt
                        (! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
                      
                        (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))