Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 95.3% → 97.4%
Time: 4.5s
Alternatives: 18
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 95.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (- (+ t y) 2.0) b (- x (fma (- t 1.0) a (* (- y 1.0) z)))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma(((t + y) - 2.0), b, (x - fma((t - 1.0), a, ((y - 1.0) * z))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(Float64(t + y) - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(Float64(y - 1.0) * z))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\right)
\end{array}
Derivation
  1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 44.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-247}:\\
\;\;\;\;\mathsf{fma}\left(y, b, x\right)\\

\mathbf{elif}\;a \leq 2.7 \cdot 10^{-119}:\\
\;\;\;\;\mathsf{fma}\left(t, b, x\right)\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+94}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.90000000000000025e33 or 9.1999999999999999e94 < a

    1. Initial program 92.2%

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
      3. lower--.f6455.4

        \[\leadsto \left(1 - t\right) \cdot a \]
    4. Applied rewrites55.4%

      \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

    if -2.90000000000000025e33 < a < -4.5000000000000002e-247

    1. Initial program 97.7%

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

      \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. Applied rewrites63.7%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
        10. lift-+.f6463.7

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
      3. Applied rewrites63.7%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
      5. Step-by-step derivation
        1. Applied rewrites38.0%

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

        if -4.5000000000000002e-247 < a < 2.70000000000000027e-119

        1. Initial program 98.1%

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

          \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
        3. Step-by-step derivation
          1. Applied rewrites64.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
            10. lift-+.f6464.0

              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
          3. Applied rewrites64.0%

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites42.2%

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

            if 2.70000000000000027e-119 < a < 9.1999999999999999e94

            1. Initial program 96.1%

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

              \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
              3. lower--.f6428.9

                \[\leadsto \left(1 - y\right) \cdot z \]
            4. Applied rewrites28.9%

              \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
          6. Recombined 4 regimes into one program.
          7. Add Preprocessing

          Alternative 3: 45.4% accurate, 1.1× speedup?

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

            1. Initial program 92.1%

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

              \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
              3. lower--.f6456.1

                \[\leadsto \left(1 - t\right) \cdot a \]
            4. Applied rewrites56.1%

              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]

            if -2.90000000000000025e33 < a < -4.5000000000000002e-247 or 3.0000000000000002e-119 < a < 3.5000000000000002e111

            1. Initial program 97.0%

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

              \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
            3. Step-by-step derivation
              1. Applied rewrites61.2%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                10. lift-+.f6461.2

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
              3. Applied rewrites61.2%

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
              5. Step-by-step derivation
                1. Applied rewrites37.2%

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

                if -4.5000000000000002e-247 < a < 3.0000000000000002e-119

                1. Initial program 98.1%

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

                  \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                3. Step-by-step derivation
                  1. Applied rewrites64.0%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                    10. lift-+.f6464.0

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                  3. Applied rewrites64.0%

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                  5. Step-by-step derivation
                    1. Applied rewrites42.2%

                      \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                  6. Recombined 3 regimes into one program.
                  7. Add Preprocessing

                  Alternative 4: 80.6% accurate, 1.1× speedup?

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

                    1. Initial program 92.3%

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

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

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

                        \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                      3. lower--.f6471.9

                        \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                    4. Applied rewrites71.9%

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

                      \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                    6. Step-by-step derivation
                      1. Applied rewrites67.2%

                        \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]

                      if -2.1999999999999999e-23 < b < 7.80000000000000036e144

                      1. Initial program 98.3%

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

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

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

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

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

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

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

                          \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                        7. lift--.f6485.9

                          \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                      4. Applied rewrites85.9%

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

                      if 7.80000000000000036e144 < b

                      1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, z \cdot \left(1 - y\right)\right) \]
                        2. associate--l-N/A

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

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

                          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(1 - y\right) \cdot \color{blue}{z}\right) \]
                        5. lower--.f6484.1

                          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(1 - y\right) \cdot z\right) \]
                      6. Applied rewrites84.1%

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

                    Alternative 5: 80.8% accurate, 1.1× speedup?

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

                      1. Initial program 92.3%

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

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

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

                          \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                        3. lower--.f6471.9

                          \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                      4. Applied rewrites71.9%

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

                        \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                      6. Step-by-step derivation
                        1. Applied rewrites67.2%

                          \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]

                        if -2.1999999999999999e-23 < b < 1.84999999999999997e145

                        1. Initial program 98.3%

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

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

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

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

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

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

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

                            \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                          7. lift--.f6485.9

                            \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                        4. Applied rewrites85.9%

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

                        if 1.84999999999999997e145 < b

                        1. Initial program 88.6%

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

                          \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                        3. Step-by-step derivation
                          1. Applied rewrites85.9%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                            10. lift-+.f6485.9

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                          3. Applied rewrites85.9%

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

                        Alternative 6: 51.7% accurate, 1.4× speedup?

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

                          1. Initial program 92.3%

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

                            \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

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

                              \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                            3. lower--.f6467.2

                              \[\leadsto \left(b - z\right) \cdot y \]
                          4. Applied rewrites67.2%

                            \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]

                          if -4.8000000000000004e50 < y < -1.5000000000000001e-133

                          1. Initial program 98.2%

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

                            \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                          3. Step-by-step derivation
                            1. Applied rewrites50.9%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                              10. lift-+.f6450.9

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                            3. Applied rewrites50.9%

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

                              \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites37.5%

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

                              if -1.5000000000000001e-133 < y < 2.35e7

                              1. Initial program 97.8%

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

                                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                              3. Step-by-step derivation
                                1. *-commutativeN/A

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

                                  \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                3. lower--.f6439.1

                                  \[\leadsto \left(b - a\right) \cdot t \]
                              4. Applied rewrites39.1%

                                \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                            6. Recombined 3 regimes into one program.
                            7. Add Preprocessing

                            Alternative 7: 51.6% accurate, 1.4× speedup?

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

                              1. Initial program 91.4%

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

                                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                              3. Step-by-step derivation
                                1. *-commutativeN/A

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

                                  \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                3. lower--.f6469.2

                                  \[\leadsto \left(b - a\right) \cdot t \]
                              4. Applied rewrites69.2%

                                \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]

                              if -1.65e59 < t < 2.1e-102

                              1. Initial program 98.2%

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

                                \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                              3. Step-by-step derivation
                                1. Applied rewrites51.5%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                  10. lift-+.f6451.5

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                3. Applied rewrites51.5%

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

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                5. Step-by-step derivation
                                  1. Applied rewrites39.4%

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

                                  if 2.1e-102 < t < 1.25000000000000005e35

                                  1. Initial program 98.2%

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

                                    \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
                                  3. Step-by-step derivation
                                    1. *-commutativeN/A

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

                                      \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
                                    3. lower--.f6435.5

                                      \[\leadsto \left(1 - y\right) \cdot z \]
                                  4. Applied rewrites35.5%

                                    \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                6. Recombined 3 regimes into one program.
                                7. Add Preprocessing

                                Alternative 8: 69.6% accurate, 1.4× speedup?

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

                                  1. Initial program 92.3%

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

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

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

                                      \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                    3. lower--.f6471.9

                                      \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                                  4. Applied rewrites71.9%

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

                                    \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites67.2%

                                      \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]

                                    if -2.1999999999999999e-23 < b < 0.170000000000000012

                                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right) + x\right) - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right) \]
                                      15. mul-1-negN/A

                                        \[\leadsto \left(\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right) + x\right) - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right) \]
                                      16. lower-neg.f6499.1

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

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

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

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

                                      if 0.170000000000000012 < b

                                      1. Initial program 91.5%

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

                                        \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites72.3%

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                          10. lift-+.f6472.3

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                        3. Applied rewrites72.3%

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

                                      Alternative 9: 70.3% accurate, 1.4× speedup?

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

                                        1. Initial program 91.9%

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

                                          \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites71.0%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                            10. lift-+.f6471.0

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                          3. Applied rewrites71.0%

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

                                          if -2.1999999999999999e-23 < b < 0.170000000000000012

                                          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right) + x\right) - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right) \]
                                            15. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right) + x\right) - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right) \]
                                            16. lower-neg.f6499.1

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

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

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

                                              \[\leadsto x - \mathsf{fma}\left(\color{blue}{t - 1}, a, -z\right) \]
                                          7. Recombined 2 regimes into one program.
                                          8. Add Preprocessing

                                          Alternative 10: 64.7% accurate, 1.5× speedup?

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

                                            1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                10. lift-+.f6470.4

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

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

                                              if -2.1000000000000001e-23 < b < 9.00000000000000026e-19

                                              1. Initial program 99.1%

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

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

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

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

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

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

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

                                                  \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                                7. lift--.f6492.5

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

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

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

                                                  \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
                                                2. lift--.f6458.0

                                                  \[\leadsto x - z \cdot \left(y - 1\right) \]
                                              7. Applied rewrites58.0%

                                                \[\leadsto x - z \cdot \color{blue}{\left(y - 1\right)} \]
                                            4. Recombined 2 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 11: 60.2% accurate, 1.5× speedup?

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

                                              1. Initial program 92.1%

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

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

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

                                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
                                                3. lift--.f64N/A

                                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
                                                4. lift-+.f64N/A

                                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
                                                5. lift-*.f6462.2

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

                                                  \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b \]
                                                7. +-commutativeN/A

                                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                                8. lower-+.f6462.2

                                                  \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                              4. Applied rewrites62.2%

                                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]

                                              if -2.1999999999999999e-23 < b < 1e-13

                                              1. Initial program 99.1%

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

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

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

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

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

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

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

                                                  \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                                7. lift--.f6492.4

                                                  \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                              4. Applied rewrites92.4%

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

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

                                                  \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
                                                2. lift--.f6457.9

                                                  \[\leadsto x - z \cdot \left(y - 1\right) \]
                                              7. Applied rewrites57.9%

                                                \[\leadsto x - z \cdot \color{blue}{\left(y - 1\right)} \]
                                            3. Recombined 2 regimes into one program.
                                            4. Add Preprocessing

                                            Alternative 12: 57.7% accurate, 1.7× speedup?

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

                                              1. Initial program 91.9%

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

                                                \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                              3. Step-by-step derivation
                                                1. *-commutativeN/A

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

                                                  \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                                                3. lower--.f6469.0

                                                  \[\leadsto \left(b - z\right) \cdot y \]
                                              4. Applied rewrites69.0%

                                                \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]

                                              if -4.8000000000000004e50 < y < 6.79999999999999992e38

                                              1. Initial program 97.9%

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

                                                \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites51.0%

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                  10. lift-+.f6451.0

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                                3. Applied rewrites51.0%

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

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{t} - 2, b, x\right) \]
                                                5. Step-by-step derivation
                                                  1. Applied rewrites49.1%

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{t} - 2, b, x\right) \]
                                                6. Recombined 2 regimes into one program.
                                                7. Add Preprocessing

                                                Alternative 13: 39.8% accurate, 1.8× speedup?

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

                                                  1. Initial program 92.8%

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

                                                    \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites50.7%

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                      10. lift-+.f6450.7

                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                                    3. Applied rewrites50.7%

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                    5. Step-by-step derivation
                                                      1. Applied rewrites41.0%

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

                                                      if -2.9000000000000002e-12 < y < 4.79999999999999979e45

                                                      1. Initial program 97.9%

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

                                                        \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites51.1%

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                          10. lift-+.f6451.1

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

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

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                                                        5. Step-by-step derivation
                                                          1. Applied rewrites39.4%

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

                                                          if 4.79999999999999979e45 < y

                                                          1. Initial program 92.3%

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

                                                            \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                          3. Step-by-step derivation
                                                            1. *-commutativeN/A

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

                                                              \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                                                            3. lower--.f6469.4

                                                              \[\leadsto \left(b - z\right) \cdot y \]
                                                          4. Applied rewrites69.4%

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

                                                            \[\leadsto \left(-1 \cdot z\right) \cdot y \]
                                                          6. Step-by-step derivation
                                                            1. mul-1-negN/A

                                                              \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot y \]
                                                            2. lift-neg.f6439.6

                                                              \[\leadsto \left(-z\right) \cdot y \]
                                                          7. Applied rewrites39.6%

                                                            \[\leadsto \left(-z\right) \cdot y \]
                                                        6. Recombined 3 regimes into one program.
                                                        7. Add Preprocessing

                                                        Alternative 14: 40.9% accurate, 1.9× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a b)
                                                         :precision binary64
                                                         (if (<= y -2.9e-12) (fma y b x) (if (<= y 6e+23) (fma t b x) (fma y b x))))
                                                        double code(double x, double y, double z, double t, double a, double b) {
                                                        	double tmp;
                                                        	if (y <= -2.9e-12) {
                                                        		tmp = fma(y, b, x);
                                                        	} else if (y <= 6e+23) {
                                                        		tmp = fma(t, b, x);
                                                        	} else {
                                                        		tmp = fma(y, b, x);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(x, y, z, t, a, b)
                                                        	tmp = 0.0
                                                        	if (y <= -2.9e-12)
                                                        		tmp = fma(y, b, x);
                                                        	elseif (y <= 6e+23)
                                                        		tmp = fma(t, b, x);
                                                        	else
                                                        		tmp = fma(y, b, x);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.9e-12], N[(y * b + x), $MachinePrecision], If[LessEqual[y, 6e+23], N[(t * b + x), $MachinePrecision], N[(y * b + x), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;y \leq -2.9 \cdot 10^{-12}:\\
                                                        \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                                        
                                                        \mathbf{elif}\;y \leq 6 \cdot 10^{+23}:\\
                                                        \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if y < -2.9000000000000002e-12 or 6.0000000000000002e23 < y

                                                          1. Initial program 92.7%

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

                                                            \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites50.7%

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                              10. lift-+.f6450.7

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right) \]
                                                            3. Applied rewrites50.7%

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

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                            5. Step-by-step derivation
                                                              1. Applied rewrites42.3%

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

                                                              if -2.9000000000000002e-12 < y < 6.0000000000000002e23

                                                              1. Initial program 97.9%

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

                                                                \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites51.1%

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                                  10. lift-+.f6451.1

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

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

                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites39.5%

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                                                                6. Recombined 2 regimes into one program.
                                                                7. Add Preprocessing

                                                                Alternative 15: 37.8% accurate, 1.9× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+51}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \end{array} \]
                                                                (FPCore (x y z t a b)
                                                                 :precision binary64
                                                                 (if (<= y -3e+51) (* b y) (if (<= y 2.1e+44) (fma t b x) (* b y))))
                                                                double code(double x, double y, double z, double t, double a, double b) {
                                                                	double tmp;
                                                                	if (y <= -3e+51) {
                                                                		tmp = b * y;
                                                                	} else if (y <= 2.1e+44) {
                                                                		tmp = fma(t, b, x);
                                                                	} else {
                                                                		tmp = b * y;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                function code(x, y, z, t, a, b)
                                                                	tmp = 0.0
                                                                	if (y <= -3e+51)
                                                                		tmp = Float64(b * y);
                                                                	elseif (y <= 2.1e+44)
                                                                		tmp = fma(t, b, x);
                                                                	else
                                                                		tmp = Float64(b * y);
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3e+51], N[(b * y), $MachinePrecision], If[LessEqual[y, 2.1e+44], N[(t * b + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;y \leq -3 \cdot 10^{+51}:\\
                                                                \;\;\;\;b \cdot y\\
                                                                
                                                                \mathbf{elif}\;y \leq 2.1 \cdot 10^{+44}:\\
                                                                \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;b \cdot y\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if y < -3e51 or 2.09999999999999987e44 < y

                                                                  1. Initial program 91.9%

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

                                                                    \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                  3. Step-by-step derivation
                                                                    1. *-commutativeN/A

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

                                                                      \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                                                                    3. lower--.f6469.4

                                                                      \[\leadsto \left(b - z\right) \cdot y \]
                                                                  4. Applied rewrites69.4%

                                                                    \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                                  5. Taylor expanded in z around 0

                                                                    \[\leadsto b \cdot y \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites36.3%

                                                                      \[\leadsto b \cdot y \]

                                                                    if -3e51 < y < 2.09999999999999987e44

                                                                    1. Initial program 97.9%

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

                                                                      \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites51.1%

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(y + t\right) - 2}, b, x\right) \]
                                                                        10. lift-+.f6451.1

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

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

                                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                                                                      5. Step-by-step derivation
                                                                        1. Applied rewrites38.9%

                                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{t}, b, x\right) \]
                                                                      6. Recombined 2 regimes into one program.
                                                                      7. Add Preprocessing

                                                                      Alternative 16: 27.4% accurate, 2.1× speedup?

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

                                                                        1. Initial program 92.7%

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

                                                                          \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                                        3. Step-by-step derivation
                                                                          1. *-commutativeN/A

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

                                                                            \[\leadsto \left(b - z\right) \cdot \color{blue}{y} \]
                                                                          3. lower--.f6464.5

                                                                            \[\leadsto \left(b - z\right) \cdot y \]
                                                                        4. Applied rewrites64.5%

                                                                          \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                                                        5. Taylor expanded in z around 0

                                                                          \[\leadsto b \cdot y \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites33.5%

                                                                            \[\leadsto b \cdot y \]

                                                                          if -2.9000000000000002e-12 < y < 6.0000000000000002e23

                                                                          1. Initial program 97.9%

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

                                                                            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                          3. Step-by-step derivation
                                                                            1. *-commutativeN/A

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

                                                                              \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                                            3. lower--.f6438.6

                                                                              \[\leadsto \left(b - a\right) \cdot t \]
                                                                          4. Applied rewrites38.6%

                                                                            \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                          5. Taylor expanded in a around 0

                                                                            \[\leadsto b \cdot t \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites21.4%

                                                                              \[\leadsto b \cdot t \]
                                                                          7. Recombined 2 regimes into one program.
                                                                          8. Add Preprocessing

                                                                          Alternative 17: 27.0% accurate, 2.1× speedup?

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

                                                                            1. Initial program 91.5%

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

                                                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                            3. Step-by-step derivation
                                                                              1. *-commutativeN/A

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

                                                                                \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                                              3. lower--.f6469.2

                                                                                \[\leadsto \left(b - a\right) \cdot t \]
                                                                            4. Applied rewrites69.2%

                                                                              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                            5. Taylor expanded in a around 0

                                                                              \[\leadsto b \cdot t \]
                                                                            6. Step-by-step derivation
                                                                              1. Applied rewrites37.0%

                                                                                \[\leadsto b \cdot t \]

                                                                              if -1.6599999999999999e59 < t < 1.7e33

                                                                              1. Initial program 98.2%

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

                                                                                \[\leadsto \color{blue}{x} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites19.7%

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

                                                                              Alternative 18: 15.6% accurate, 37.0× speedup?

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

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

                                                                                \[\leadsto \color{blue}{x} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites15.6%

                                                                                  \[\leadsto \color{blue}{x} \]
                                                                                2. Add Preprocessing

                                                                                Reproduce

                                                                                ?
                                                                                herbie shell --seed 2025095 
                                                                                (FPCore (x y z t a b)
                                                                                  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
                                                                                  :precision binary64
                                                                                  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))