Development.Shake.Progress:decay from shake-0.15.5

Percentage Accurate: 67.0% → 97.7%
Time: 15.0s
Alternatives: 16
Speedup: 1.2×

Specification

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

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

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

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

Alternative 1: 97.7% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_3 \leq 10^{+284}:\\
\;\;\;\;t\_3\\

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

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000029e-289 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000008e284

    1. Initial program 99.6%

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

    if -5.00000000000000029e-289 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 7.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{\frac{x}{z} \cdot y}{b - y} + \color{blue}{\frac{t - a}{b - y}}\right) - \frac{y \cdot \left(t - a\right)}{z \cdot {\left(b - y\right)}^{2}} \]
      8. div-add-revN/A

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

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

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

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

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

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

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

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

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

Alternative 2: 94.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t\_3 \leq 10^{+284}:\\
\;\;\;\;t\_3\\

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

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000029e-289 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000008e284

    1. Initial program 99.6%

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

    if -5.00000000000000029e-289 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 7.7%

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

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

        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
      2. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
      3. lower--.f6478.9

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
    5. Applied rewrites78.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.5%

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

Alternative 3: 90.3% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{t - a}{x}, y\right)}{t\_3} \cdot x\\

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


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

    1. Initial program 23.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000029e-289 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999984e274

    1. Initial program 99.6%

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

    if -5.00000000000000029e-289 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 7.7%

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

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

        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
      2. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
      3. lower--.f6478.9

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
    5. Applied rewrites78.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if 1.99999999999999984e274 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 90.5% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\

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

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

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

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


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

    1. Initial program 27.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -5.00000000000000029e-289 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999984e274

    1. Initial program 99.6%

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

    if -5.00000000000000029e-289 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y))))

    1. Initial program 7.7%

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

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

        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
      2. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
      3. lower--.f6478.9

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
    5. Applied rewrites78.9%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.5%

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

Alternative 5: 84.8% accurate, 0.8× speedup?

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

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

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+54} \lor \neg \left(z \leq 1.1 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.04999999999999984e54 or 1.09999999999999998e60 < z

    1. Initial program 34.2%

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

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

        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
      2. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
      3. lower--.f6482.1

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
    5. Applied rewrites82.1%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -2.04999999999999984e54 < z < 1.09999999999999998e60

    1. Initial program 87.7%

      \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification85.7%

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

Alternative 6: 73.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-35} \lor \neg \left(z \leq 2.1 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.30000000000000002e-35 or 2.09999999999999994e-12 < z

    1. Initial program 49.4%

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

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

        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
      2. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
      3. lower--.f6476.2

        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
    5. Applied rewrites76.2%

      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

    if -1.30000000000000002e-35 < z < 2.09999999999999994e-12

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{\color{blue}{\mathsf{fma}\left(b - y, x, a\right)}}{y}, z, x\right) \]
      11. lower--.f6455.8

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-35} \lor \neg \left(z \leq 2.1 \cdot 10^{-12}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t - \mathsf{fma}\left(b, x, a\right)\right) \cdot z}{y} + x\\ \end{array} \]
      6. Add Preprocessing

      Alternative 7: 72.4% accurate, 1.2× speedup?

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

        1. Initial program 49.4%

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

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

            \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
          2. lower--.f64N/A

            \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
          3. lower--.f6476.2

            \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
        5. Applied rewrites76.2%

          \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

        if -1.30000000000000002e-35 < z < 2.09999999999999994e-12

        1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{\color{blue}{\mathsf{fma}\left(b - y, x, a\right)}}{y}, z, x\right) \]
          11. lower--.f6455.8

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

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

          \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{a}{y}, z, x\right) \]
        7. Step-by-step derivation
          1. Applied rewrites68.8%

            \[\leadsto \mathsf{fma}\left(\frac{t - a}{y}, z, x\right) \]
        8. Recombined 2 regimes into one program.
        9. Final simplification72.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-35} \lor \neg \left(z \leq 2.1 \cdot 10^{-12}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - a}{y}, z, x\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 8: 41.8% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 - z}\\ \mathbf{if}\;y \leq -1.32 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-91}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+35}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (/ x (- 1.0 z))))
           (if (<= y -1.32e+39)
             t_1
             (if (<= y 3.6e-91) (/ (- a) b) (if (<= y 1.35e+35) (/ t (- b y)) t_1)))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x / (1.0 - z);
        	double tmp;
        	if (y <= -1.32e+39) {
        		tmp = t_1;
        	} else if (y <= 3.6e-91) {
        		tmp = -a / b;
        	} else if (y <= 1.35e+35) {
        		tmp = t / (b - y);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a, b)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: t_1
            real(8) :: tmp
            t_1 = x / (1.0d0 - z)
            if (y <= (-1.32d+39)) then
                tmp = t_1
            else if (y <= 3.6d-91) then
                tmp = -a / b
            else if (y <= 1.35d+35) then
                tmp = t / (b - y)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x / (1.0 - z);
        	double tmp;
        	if (y <= -1.32e+39) {
        		tmp = t_1;
        	} else if (y <= 3.6e-91) {
        		tmp = -a / b;
        	} else if (y <= 1.35e+35) {
        		tmp = t / (b - y);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = x / (1.0 - z)
        	tmp = 0
        	if y <= -1.32e+39:
        		tmp = t_1
        	elif y <= 3.6e-91:
        		tmp = -a / b
        	elif y <= 1.35e+35:
        		tmp = t / (b - y)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(x / Float64(1.0 - z))
        	tmp = 0.0
        	if (y <= -1.32e+39)
        		tmp = t_1;
        	elseif (y <= 3.6e-91)
        		tmp = Float64(Float64(-a) / b);
        	elseif (y <= 1.35e+35)
        		tmp = Float64(t / Float64(b - y));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = x / (1.0 - z);
        	tmp = 0.0;
        	if (y <= -1.32e+39)
        		tmp = t_1;
        	elseif (y <= 3.6e-91)
        		tmp = -a / b;
        	elseif (y <= 1.35e+35)
        		tmp = t / (b - y);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.32e+39], t$95$1, If[LessEqual[y, 3.6e-91], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 1.35e+35], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x}{1 - z}\\
        \mathbf{if}\;y \leq -1.32 \cdot 10^{+39}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 3.6 \cdot 10^{-91}:\\
        \;\;\;\;\frac{-a}{b}\\
        
        \mathbf{elif}\;y \leq 1.35 \cdot 10^{+35}:\\
        \;\;\;\;\frac{t}{b - y}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -1.32e39 or 1.35000000000000001e35 < y

          1. Initial program 55.4%

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

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

              \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
            2. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
            4. *-lft-identityN/A

              \[\leadsto \frac{x}{1 - \color{blue}{z}} \]
            5. lower--.f6457.4

              \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
          5. Applied rewrites57.4%

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

          if -1.32e39 < y < 3.6e-91

          1. Initial program 80.6%

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

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

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

              \[\leadsto \mathsf{neg}\left(\color{blue}{a \cdot \frac{z}{y + z \cdot \left(b - y\right)}}\right) \]
            3. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
          7. Step-by-step derivation
            1. Applied rewrites42.1%

              \[\leadsto \frac{-a}{\color{blue}{b}} \]

            if 3.6e-91 < y < 1.35000000000000001e35

            1. Initial program 78.1%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \cdot t \]
              8. lower--.f6438.0

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

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

              \[\leadsto \frac{t}{\color{blue}{b - y}} \]
            7. Step-by-step derivation
              1. Applied rewrites47.6%

                \[\leadsto \frac{t}{\color{blue}{b - y}} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification49.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+39}:\\ \;\;\;\;\frac{x}{1 - z}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-91}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+35}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - z}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 9: 43.6% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{b - y}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (/ t (- b y))))
               (if (<= z -4e+134)
                 t_1
                 (if (<= z -1.12e-35) (/ (- a) b) (if (<= z 3.5e-67) (* 1.0 x) t_1)))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = t / (b - y);
            	double tmp;
            	if (z <= -4e+134) {
            		tmp = t_1;
            	} else if (z <= -1.12e-35) {
            		tmp = -a / b;
            	} else if (z <= 3.5e-67) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: t_1
                real(8) :: tmp
                t_1 = t / (b - y)
                if (z <= (-4d+134)) then
                    tmp = t_1
                else if (z <= (-1.12d-35)) then
                    tmp = -a / b
                else if (z <= 3.5d-67) then
                    tmp = 1.0d0 * x
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = t / (b - y);
            	double tmp;
            	if (z <= -4e+134) {
            		tmp = t_1;
            	} else if (z <= -1.12e-35) {
            		tmp = -a / b;
            	} else if (z <= 3.5e-67) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = t / (b - y)
            	tmp = 0
            	if z <= -4e+134:
            		tmp = t_1
            	elif z <= -1.12e-35:
            		tmp = -a / b
            	elif z <= 3.5e-67:
            		tmp = 1.0 * x
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(t / Float64(b - y))
            	tmp = 0.0
            	if (z <= -4e+134)
            		tmp = t_1;
            	elseif (z <= -1.12e-35)
            		tmp = Float64(Float64(-a) / b);
            	elseif (z <= 3.5e-67)
            		tmp = Float64(1.0 * x);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = t / (b - y);
            	tmp = 0.0;
            	if (z <= -4e+134)
            		tmp = t_1;
            	elseif (z <= -1.12e-35)
            		tmp = -a / b;
            	elseif (z <= 3.5e-67)
            		tmp = 1.0 * x;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+134], t$95$1, If[LessEqual[z, -1.12e-35], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 3.5e-67], N[(1.0 * x), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{t}{b - y}\\
            \mathbf{if}\;z \leq -4 \cdot 10^{+134}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\
            \;\;\;\;\frac{-a}{b}\\
            
            \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\
            \;\;\;\;1 \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -3.99999999999999969e134 or 3.5e-67 < z

              1. Initial program 46.2%

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{z}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \cdot t \]
                8. lower--.f6427.0

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

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

                \[\leadsto \frac{t}{\color{blue}{b - y}} \]
              7. Step-by-step derivation
                1. Applied rewrites39.5%

                  \[\leadsto \frac{t}{\color{blue}{b - y}} \]

                if -3.99999999999999969e134 < z < -1.12e-35

                1. Initial program 73.1%

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

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

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

                    \[\leadsto \mathsf{neg}\left(\color{blue}{a \cdot \frac{z}{y + z \cdot \left(b - y\right)}}\right) \]
                  3. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
                7. Step-by-step derivation
                  1. Applied rewrites44.4%

                    \[\leadsto \frac{-a}{\color{blue}{b}} \]

                  if -1.12e-35 < z < 3.5e-67

                  1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 1 \cdot x \]
                  9. Step-by-step derivation
                    1. Applied rewrites58.3%

                      \[\leadsto 1 \cdot x \]
                  10. Recombined 3 regimes into one program.
                  11. Final simplification48.5%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+134}:\\ \;\;\;\;\frac{t}{b - y}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{b - y}\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 10: 68.4% accurate, 1.2× speedup?

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

                    1. Initial program 52.7%

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

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

                        \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                      2. lower--.f64N/A

                        \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
                      3. lower--.f6473.9

                        \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
                    5. Applied rewrites73.9%

                      \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

                    if -1.24999999999999991e-35 < z < 2.65000000000000019e-65

                    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{t}{y} - \frac{\color{blue}{\mathsf{fma}\left(b - y, x, a\right)}}{y}, z, x\right) \]
                      11. lower--.f6456.8

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

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

                      \[\leadsto \mathsf{fma}\left(-1 \cdot \frac{a}{y}, z, x\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites66.8%

                        \[\leadsto \mathsf{fma}\left(\frac{-a}{y}, z, x\right) \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification70.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-35} \lor \neg \left(z \leq 2.65 \cdot 10^{-65}\right):\\ \;\;\;\;\frac{t - a}{b - y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-a}{y}, z, x\right)\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 11: 37.8% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-a}{b}\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 2700000:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (/ (- a) b)))
                       (if (<= z -1.12e-35)
                         t_1
                         (if (<= z 3.5e-67) (* 1.0 x) (if (<= z 2700000.0) (/ t b) t_1)))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = -a / b;
                    	double tmp;
                    	if (z <= -1.12e-35) {
                    		tmp = t_1;
                    	} else if (z <= 3.5e-67) {
                    		tmp = 1.0 * x;
                    	} else if (z <= 2700000.0) {
                    		tmp = t / b;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = -a / b
                        if (z <= (-1.12d-35)) then
                            tmp = t_1
                        else if (z <= 3.5d-67) then
                            tmp = 1.0d0 * x
                        else if (z <= 2700000.0d0) then
                            tmp = t / b
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = -a / b;
                    	double tmp;
                    	if (z <= -1.12e-35) {
                    		tmp = t_1;
                    	} else if (z <= 3.5e-67) {
                    		tmp = 1.0 * x;
                    	} else if (z <= 2700000.0) {
                    		tmp = t / b;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = -a / b
                    	tmp = 0
                    	if z <= -1.12e-35:
                    		tmp = t_1
                    	elif z <= 3.5e-67:
                    		tmp = 1.0 * x
                    	elif z <= 2700000.0:
                    		tmp = t / b
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(-a) / b)
                    	tmp = 0.0
                    	if (z <= -1.12e-35)
                    		tmp = t_1;
                    	elseif (z <= 3.5e-67)
                    		tmp = Float64(1.0 * x);
                    	elseif (z <= 2700000.0)
                    		tmp = Float64(t / b);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = -a / b;
                    	tmp = 0.0;
                    	if (z <= -1.12e-35)
                    		tmp = t_1;
                    	elseif (z <= 3.5e-67)
                    		tmp = 1.0 * x;
                    	elseif (z <= 2700000.0)
                    		tmp = t / b;
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -1.12e-35], t$95$1, If[LessEqual[z, 3.5e-67], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 2700000.0], N[(t / b), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \frac{-a}{b}\\
                    \mathbf{if}\;z \leq -1.12 \cdot 10^{-35}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\
                    \;\;\;\;1 \cdot x\\
                    
                    \mathbf{elif}\;z \leq 2700000:\\
                    \;\;\;\;\frac{t}{b}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if z < -1.12e-35 or 2.7e6 < z

                      1. Initial program 45.7%

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

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

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

                          \[\leadsto \mathsf{neg}\left(\color{blue}{a \cdot \frac{z}{y + z \cdot \left(b - y\right)}}\right) \]
                        3. distribute-lft-neg-inN/A

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

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

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

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

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

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

                          \[\leadsto \left(-a\right) \cdot \frac{z}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \]
                        10. lower--.f6430.2

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

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

                        \[\leadsto -1 \cdot \color{blue}{\frac{a}{b}} \]
                      7. Step-by-step derivation
                        1. Applied rewrites34.4%

                          \[\leadsto \frac{-a}{\color{blue}{b}} \]

                        if -1.12e-35 < z < 3.5e-67

                        1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto 1 \cdot x \]
                        9. Step-by-step derivation
                          1. Applied rewrites58.3%

                            \[\leadsto 1 \cdot x \]

                          if 3.5e-67 < z < 2.7e6

                          1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{t}{\color{blue}{b}} \]
                          7. Step-by-step derivation
                            1. Applied rewrites49.5%

                              \[\leadsto \frac{t}{\color{blue}{b}} \]
                          8. Recombined 3 regimes into one program.
                          9. Final simplification46.2%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-35}:\\ \;\;\;\;\frac{-a}{b}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-67}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 2700000:\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-a}{b}\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 12: 65.2% accurate, 1.3× speedup?

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

                            1. Initial program 53.7%

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

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

                                \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]
                              2. lower--.f64N/A

                                \[\leadsto \frac{\color{blue}{t - a}}{b - y} \]
                              3. lower--.f6473.2

                                \[\leadsto \frac{t - a}{\color{blue}{b - y}} \]
                            5. Applied rewrites73.2%

                              \[\leadsto \color{blue}{\frac{t - a}{b - y}} \]

                            if -1.59999999999999989e-38 < z < 1.1499999999999999e-71

                            1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\mathsf{fma}\left(z, \frac{t - a}{x}, y\right)}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \cdot x \]
                              14. lower--.f6480.8

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

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

                              \[\leadsto 1 \cdot x \]
                            9. Step-by-step derivation
                              1. Applied rewrites58.4%

                                \[\leadsto 1 \cdot x \]
                            10. Recombined 2 regimes into one program.
                            11. Final simplification66.8%

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

                            Alternative 13: 54.6% accurate, 1.4× speedup?

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

                              1. Initial program 55.4%

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

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

                                  \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                                2. fp-cancel-sign-sub-invN/A

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

                                  \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                                4. *-lft-identityN/A

                                  \[\leadsto \frac{x}{1 - \color{blue}{z}} \]
                                5. lower--.f6457.4

                                  \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                              5. Applied rewrites57.4%

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

                              if -1.35000000000000002e39 < y < 6.1999999999999999e36

                              1. Initial program 80.0%

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

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

                                  \[\leadsto \color{blue}{\frac{t - a}{b}} \]
                                2. lower--.f6459.9

                                  \[\leadsto \frac{\color{blue}{t - a}}{b} \]
                              5. Applied rewrites59.9%

                                \[\leadsto \color{blue}{\frac{t - a}{b}} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification58.7%

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

                            Alternative 14: 37.1% accurate, 1.6× speedup?

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

                              1. Initial program 52.7%

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{z}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \cdot t \]
                                8. lower--.f6426.5

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

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

                                \[\leadsto \frac{t}{\color{blue}{b}} \]
                              7. Step-by-step derivation
                                1. Applied rewrites23.5%

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

                                if -1.21999999999999996e-29 < z < 3.5e-67

                                1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\mathsf{fma}\left(z, \frac{t - a}{x}, y\right)}{\color{blue}{\mathsf{fma}\left(b - y, z, y\right)}} \cdot x \]
                                  14. lower--.f6480.4

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

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

                                  \[\leadsto 1 \cdot x \]
                                9. Step-by-step derivation
                                  1. Applied rewrites57.8%

                                    \[\leadsto 1 \cdot x \]
                                10. Recombined 2 regimes into one program.
                                11. Final simplification38.8%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{-29} \lor \neg \left(z \leq 3.5 \cdot 10^{-67}\right):\\ \;\;\;\;\frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                                12. Add Preprocessing

                                Alternative 15: 26.0% accurate, 5.6× speedup?

                                \[\begin{array}{l} \\ \mathsf{fma}\left(x, z, x\right) \end{array} \]
                                (FPCore (x y z t a b) :precision binary64 (fma x z x))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return fma(x, z, x);
                                }
                                
                                function code(x, y, z, t, a, b)
                                	return fma(x, z, x)
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := N[(x * z + x), $MachinePrecision]
                                
                                \begin{array}{l}
                                
                                \\
                                \mathsf{fma}\left(x, z, x\right)
                                \end{array}
                                
                                Derivation
                                1. Initial program 68.5%

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

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

                                    \[\leadsto \color{blue}{\frac{x}{1 + -1 \cdot z}} \]
                                  2. fp-cancel-sign-sub-invN/A

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

                                    \[\leadsto \frac{x}{1 - \color{blue}{1} \cdot z} \]
                                  4. *-lft-identityN/A

                                    \[\leadsto \frac{x}{1 - \color{blue}{z}} \]
                                  5. lower--.f6436.3

                                    \[\leadsto \frac{x}{\color{blue}{1 - z}} \]
                                5. Applied rewrites36.3%

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

                                  \[\leadsto x + \color{blue}{x \cdot z} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites28.9%

                                    \[\leadsto \mathsf{fma}\left(x, \color{blue}{z}, x\right) \]
                                  2. Final simplification28.9%

                                    \[\leadsto \mathsf{fma}\left(x, z, x\right) \]
                                  3. Add Preprocessing

                                  Alternative 16: 25.9% accurate, 6.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto 1 \cdot x \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites28.7%

                                      \[\leadsto 1 \cdot x \]
                                    2. Add Preprocessing

                                    Developer Target 1: 74.3% accurate, 0.6× speedup?

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024357 
                                    (FPCore (x y z t a b)
                                      :name "Development.Shake.Progress:decay from shake-0.15.5"
                                      :precision binary64
                                    
                                      :alt
                                      (! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
                                    
                                      (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))