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

Percentage Accurate: 95.0% → 97.2%
Time: 5.2s
Alternatives: 23
Speedup: 1.0×

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 23 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.0% 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.2% accurate, 1.0× speedup?

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

\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - t, a, x\right) + \left(1 - y\right) \cdot z\right)
\end{array}
Derivation
  1. Initial program 95.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. 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. *-commutativeN/A

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\right) \]
    3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.2% accurate, 1.0× speedup?

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

\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)
\end{array}
Derivation
  1. Initial program 95.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. 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. *-commutativeN/A

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

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

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

Alternative 3: 87.6% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.5e-20 or 1.9500000000000001e33 < b

    1. Initial program 90.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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(x + \left(z + \left(b \cdot \left(t - 2\right) + y \cdot \left(b + -1 \cdot z\right)\right)\right)\right) - a \cdot \left(t - 1\right) \]
      4. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

        \[\leadsto x + \left(\left(\left(t - 2\right) \cdot b + y \cdot \left(b - z\right)\right) + z\right) \]
      3. *-commutativeN/A

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

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

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

        \[\leadsto \left(\left(\left(b - z\right) \cdot y + \left(t - 2\right) \cdot b\right) + z\right) + x \]
      7. associate-+l+N/A

        \[\leadsto \left(\left(b - z\right) \cdot y + \left(\left(t - 2\right) \cdot b + z\right)\right) + x \]
      8. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z\right)\right) + x \]
      15. lift--.f6484.4

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

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

    if -9.5e-20 < b < 1.9500000000000001e33

    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. 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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
      4. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(1 - y\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(1 - y\right) \cdot z + \left(x + \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a}\right) \]
      7. negate-sub2N/A

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      12. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x + z \cdot \left(1 - y\right)\right) \]
      16. negate-sub2N/A

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

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

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

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

Alternative 4: 84.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq 5.7 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\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 < -2e-16

    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. 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. *-commutativeN/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\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. negate-sub2N/A

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, z \cdot \left(1 - y\right)\right) \]
      3. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(1 - y\right) \cdot \color{blue}{z}\right) \]
      6. lift--.f6476.3

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

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

    if -2e-16 < b < 5.70000000000000039e87

    1. Initial program 98.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. 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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
      4. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1 - y, z, x - \left(t - 1\right) \cdot a\right) \]
      16. lift-*.f6488.2

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

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

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

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

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

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

        \[\leadsto \left(1 - y\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(1 - y\right) \cdot z + \left(x + \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a}\right) \]
      7. negate-sub2N/A

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      12. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x + z \cdot \left(1 - y\right)\right) \]
      16. negate-sub2N/A

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

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

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

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

    if 5.70000000000000039e87 < b

    1. Initial program 88.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. *-commutativeN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
    5. Step-by-step derivation
      1. +-commutative81.8

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      2. negate-sub281.8

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      3. fp-cancel-sub-sign-inv81.8

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
    6. Applied rewrites81.8%

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

Alternative 5: 84.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.00000000000000006e43 or 5.70000000000000039e87 < b

    1. Initial program 89.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. 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. *-commutativeN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.0

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      2. negate-sub280.0

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      3. fp-cancel-sub-sign-inv80.0

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

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

    if -4.00000000000000006e43 < b < 5.70000000000000039e87

    1. Initial program 98.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. 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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
      4. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(1 - y\right) \cdot z + \left(x - \left(t - 1\right) \cdot a\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(1 - y\right) \cdot z + \left(x + \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a}\right) \]
      7. negate-sub2N/A

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      12. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + \left(x + \left(1 - y\right) \cdot z\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x + z \cdot \left(1 - y\right)\right) \]
      16. negate-sub2N/A

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

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

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

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

Alternative 6: 76.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.5500000000000001e43 or 1.2200000000000001e87 < b

    1. Initial program 89.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. 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. *-commutativeN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.0

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      2. negate-sub280.0

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      3. fp-cancel-sub-sign-inv80.0

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

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

    if -1.5500000000000001e43 < b < 1.2200000000000001e87

    1. Initial program 98.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. 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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
      4. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
      7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(1 - y, z, x - t \cdot a\right) \]
    9. Recombined 2 regimes into one program.
    10. Add Preprocessing

    Alternative 7: 70.9% accurate, 1.5× speedup?

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

      1. Initial program 90.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. 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. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
        3. fp-cancel-sub-sign-inv76.2

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
      6. Applied rewrites76.2%

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

      if -3.89999999999999995e-19 < b < 1.19999999999999991e87

      1. Initial program 98.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. 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. *-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
        4. fp-cancel-sub-sign-invN/A

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

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

          \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
        7. +-commutativeN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(1 - y, z, x - \left(t - 1\right) \cdot a\right) \]
        16. lift-*.f6488.3

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

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

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

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

          \[\leadsto \left(x + z\right) - a \cdot \left(t - 1\right) \]
        3. +-commutativeN/A

          \[\leadsto \left(x + z\right) - a \cdot \left(t - 1\right) \]
        4. *-commutativeN/A

          \[\leadsto \left(x + z\right) - a \cdot \left(t - 1\right) \]
        5. negate-sub2N/A

          \[\leadsto \left(x + z\right) - a \cdot \left(t - 1\right) \]
        6. fp-cancel-sub-sign-invN/A

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

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

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

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

          \[\leadsto \left(z + x\right) - a \cdot \left(t - \color{blue}{1}\right) \]
        11. lift--.f6466.8

          \[\leadsto \left(z + x\right) - a \cdot \left(t - 1\right) \]
      9. Applied rewrites66.8%

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

    Alternative 8: 64.9% accurate, 1.5× speedup?

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

      1. Initial program 90.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. *-commutativeN/A

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
        2. negate-sub274.5

          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
        3. fp-cancel-sub-sign-inv74.5

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

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

      if -2.60000000000000013e-19 < b < 5.6000000000000002e33

      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. 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. *-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
        4. fp-cancel-sub-sign-invN/A

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

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

          \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
        7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \left(t - 1\right) \cdot a \]
          2. fp-cancel-sub-sign-invN/A

            \[\leadsto x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot \color{blue}{a} \]
          3. mul-1-negN/A

            \[\leadsto x + \left(-1 \cdot \left(t - 1\right)\right) \cdot a \]
          4. *-commutativeN/A

            \[\leadsto x + a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
          5. mul-1-negN/A

            \[\leadsto x + a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
          6. negate-sub2N/A

            \[\leadsto x + a \cdot \left(1 - t\right) \]
          7. +-commutativeN/A

            \[\leadsto a \cdot \left(1 - t\right) + x \]
          8. negate-sub2N/A

            \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) + x \]
          9. mul-1-negN/A

            \[\leadsto a \cdot \left(-1 \cdot \left(t - 1\right)\right) + x \]
          10. *-commutativeN/A

            \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + x \]
          11. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x\right) \]
          12. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x\right) \]
          13. negate-sub2N/A

            \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
          14. lift--.f6456.0

            \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
        4. Applied rewrites56.0%

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

      Alternative 9: 61.2% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -2 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\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 -2e-16) t_1 (if (<= b 2.45e+87) (fma (- 1.0 t) a x) 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 <= -2e-16) {
      		tmp = t_1;
      	} else if (b <= 2.45e+87) {
      		tmp = fma((1.0 - t), a, x);
      	} 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 <= -2e-16)
      		tmp = t_1;
      	elseif (b <= 2.45e+87)
      		tmp = fma(Float64(1.0 - t), a, x);
      	else
      		tmp = t_1;
      	end
      	return 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, -2e-16], t$95$1, If[LessEqual[b, 2.45e+87], N[(N[(1.0 - t), $MachinePrecision] * a + x), $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 \cdot 10^{-16}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 2.45 \cdot 10^{+87}:\\
      \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -2e-16 or 2.44999999999999986e87 < b

        1. Initial program 90.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-*.f6469.9

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

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

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

        if -2e-16 < b < 2.44999999999999986e87

        1. Initial program 98.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. 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. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
          4. fp-cancel-sub-sign-invN/A

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

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

            \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
          7. +-commutativeN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(1 - y, z, x - \left(t - 1\right) \cdot a\right) \]
          16. lift-*.f6488.2

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

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

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

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

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

              \[\leadsto x - \left(t - 1\right) \cdot a \]
            2. fp-cancel-sub-sign-invN/A

              \[\leadsto x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot \color{blue}{a} \]
            3. mul-1-negN/A

              \[\leadsto x + \left(-1 \cdot \left(t - 1\right)\right) \cdot a \]
            4. *-commutativeN/A

              \[\leadsto x + a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
            5. mul-1-negN/A

              \[\leadsto x + a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
            6. negate-sub2N/A

              \[\leadsto x + a \cdot \left(1 - t\right) \]
            7. +-commutativeN/A

              \[\leadsto a \cdot \left(1 - t\right) + x \]
            8. negate-sub2N/A

              \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) + x \]
            9. mul-1-negN/A

              \[\leadsto a \cdot \left(-1 \cdot \left(t - 1\right)\right) + x \]
            10. *-commutativeN/A

              \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + x \]
            11. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x\right) \]
            12. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x\right) \]
            13. negate-sub2N/A

              \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
            14. lift--.f6454.4

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

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

        Alternative 10: 57.6% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -4.7 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+26}:\\ \;\;\;\;\mathsf{fma}\left(y - 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 a) t)))
           (if (<= t -4.7e+61) t_1 (if (<= t 2.65e+26) (fma (- y 2.0) b x) 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 <= -4.7e+61) {
        		tmp = t_1;
        	} else if (t <= 2.65e+26) {
        		tmp = fma((y - 2.0), b, x);
        	} 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 <= -4.7e+61)
        		tmp = t_1;
        	elseif (t <= 2.65e+26)
        		tmp = fma(Float64(y - 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 - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.7e+61], t$95$1, If[LessEqual[t, 2.65e+26], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(b - a\right) \cdot t\\
        \mathbf{if}\;t \leq -4.7 \cdot 10^{+61}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 2.65 \cdot 10^{+26}:\\
        \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -4.6999999999999998e61 or 2.64999999999999984e26 < t

          1. Initial program 91.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 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--.f6467.8

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

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

          if -4.6999999999999998e61 < t < 2.64999999999999984e26

          1. Initial program 97.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. *-commutativeN/A

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
            3. fp-cancel-sub-sign-inv52.2

              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
          6. Applied rewrites52.2%

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

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

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

          Alternative 11: 56.1% accurate, 1.8× speedup?

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

            1. Initial program 91.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. *-commutativeN/A

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

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

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

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

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

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

                \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
              4. fp-cancel-sub-sign-invN/A

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

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

                \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
              7. +-commutativeN/A

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(1 - y, z, x - \left(t - 1\right) \cdot a\right) \]
              16. lift-*.f6478.0

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

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

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

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

                \[\leadsto \mathsf{fma}\left(1 - y, z, x\right) \]
              3. Step-by-step derivation
                1. Applied rewrites62.7%

                  \[\leadsto \mathsf{fma}\left(1 - y, z, x\right) \]

                if -6.19999999999999982e113 < z < 1.02e9

                1. Initial program 97.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. 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. *-commutativeN/A

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

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

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

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

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

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

                    \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
                  4. fp-cancel-sub-sign-invN/A

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

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

                    \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
                  7. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x - \left(t - 1\right) \cdot a \]
                    2. fp-cancel-sub-sign-invN/A

                      \[\leadsto x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot \color{blue}{a} \]
                    3. mul-1-negN/A

                      \[\leadsto x + \left(-1 \cdot \left(t - 1\right)\right) \cdot a \]
                    4. *-commutativeN/A

                      \[\leadsto x + a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                    5. mul-1-negN/A

                      \[\leadsto x + a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                    6. negate-sub2N/A

                      \[\leadsto x + a \cdot \left(1 - t\right) \]
                    7. +-commutativeN/A

                      \[\leadsto a \cdot \left(1 - t\right) + x \]
                    8. negate-sub2N/A

                      \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) + x \]
                    9. mul-1-negN/A

                      \[\leadsto a \cdot \left(-1 \cdot \left(t - 1\right)\right) + x \]
                    10. *-commutativeN/A

                      \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + x \]
                    11. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x\right) \]
                    12. mul-1-negN/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x\right) \]
                    13. negate-sub2N/A

                      \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
                    14. lift--.f6451.8

                      \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
                  4. Applied rewrites51.8%

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

                Alternative 12: 53.6% accurate, 1.8× speedup?

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

                  1. Initial program 90.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. negate-sub2N/A

                      \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
                    2. mul-1-negN/A

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

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

                      \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                    5. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
                    6. negate-sub2N/A

                      \[\leadsto \left(1 - y\right) \cdot z \]
                    7. lower--.f6467.1

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

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

                  if -1.0999999999999999e131 < z < 7.99999999999999987e157

                  1. Initial program 96.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. 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. *-commutativeN/A

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

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

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

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

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

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

                      \[\leadsto \left(x + z \cdot \left(1 - y\right)\right) - a \cdot \left(t - 1\right) \]
                    4. fp-cancel-sub-sign-invN/A

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

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

                      \[\leadsto \left(x + \left(1 - y\right) \cdot z\right) - a \cdot \left(t - 1\right) \]
                    7. +-commutativeN/A

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(1 - y, z, x - \left(t - 1\right) \cdot a\right) \]
                    16. lift-*.f6461.3

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

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

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

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

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

                        \[\leadsto x - \left(t - 1\right) \cdot a \]
                      2. fp-cancel-sub-sign-invN/A

                        \[\leadsto x + \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot \color{blue}{a} \]
                      3. mul-1-negN/A

                        \[\leadsto x + \left(-1 \cdot \left(t - 1\right)\right) \cdot a \]
                      4. *-commutativeN/A

                        \[\leadsto x + a \cdot \left(-1 \cdot \color{blue}{\left(t - 1\right)}\right) \]
                      5. mul-1-negN/A

                        \[\leadsto x + a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                      6. negate-sub2N/A

                        \[\leadsto x + a \cdot \left(1 - t\right) \]
                      7. +-commutativeN/A

                        \[\leadsto a \cdot \left(1 - t\right) + x \]
                      8. negate-sub2N/A

                        \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) + x \]
                      9. mul-1-negN/A

                        \[\leadsto a \cdot \left(-1 \cdot \left(t - 1\right)\right) + x \]
                      10. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot a + x \]
                      11. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x\right) \]
                      12. mul-1-negN/A

                        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(t - 1\right)\right), a, x\right) \]
                      13. negate-sub2N/A

                        \[\leadsto \mathsf{fma}\left(1 - t, a, x\right) \]
                      14. lift--.f6448.9

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

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

                  Alternative 13: 50.2% accurate, 1.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.45 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.22 \cdot 10^{-26}:\\ \;\;\;\;\left(b - z\right) \cdot y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;x - \left(-a\right)\\ \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 -2.45e+29)
                       t_1
                       (if (<= t -1.22e-26) (* (- b z) y) (if (<= t 1.9e+26) (- x (- a)) 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 <= -2.45e+29) {
                  		tmp = t_1;
                  	} else if (t <= -1.22e-26) {
                  		tmp = (b - z) * y;
                  	} else if (t <= 1.9e+26) {
                  		tmp = x - -a;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = (b - a) * t
                      if (t <= (-2.45d+29)) then
                          tmp = t_1
                      else if (t <= (-1.22d-26)) then
                          tmp = (b - z) * y
                      else if (t <= 1.9d+26) then
                          tmp = x - -a
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (b - a) * t;
                  	double tmp;
                  	if (t <= -2.45e+29) {
                  		tmp = t_1;
                  	} else if (t <= -1.22e-26) {
                  		tmp = (b - z) * y;
                  	} else if (t <= 1.9e+26) {
                  		tmp = x - -a;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = (b - a) * t
                  	tmp = 0
                  	if t <= -2.45e+29:
                  		tmp = t_1
                  	elif t <= -1.22e-26:
                  		tmp = (b - z) * y
                  	elif t <= 1.9e+26:
                  		tmp = x - -a
                  	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 <= -2.45e+29)
                  		tmp = t_1;
                  	elseif (t <= -1.22e-26)
                  		tmp = Float64(Float64(b - z) * y);
                  	elseif (t <= 1.9e+26)
                  		tmp = Float64(x - Float64(-a));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = (b - a) * t;
                  	tmp = 0.0;
                  	if (t <= -2.45e+29)
                  		tmp = t_1;
                  	elseif (t <= -1.22e-26)
                  		tmp = (b - z) * y;
                  	elseif (t <= 1.9e+26)
                  		tmp = x - -a;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.45e+29], t$95$1, If[LessEqual[t, -1.22e-26], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.9e+26], N[(x - (-a)), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(b - a\right) \cdot t\\
                  \mathbf{if}\;t \leq -2.45 \cdot 10^{+29}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t \leq -1.22 \cdot 10^{-26}:\\
                  \;\;\;\;\left(b - z\right) \cdot y\\
                  
                  \mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\
                  \;\;\;\;x - \left(-a\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if t < -2.4500000000000001e29 or 1.9000000000000001e26 < t

                    1. Initial program 92.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 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--.f6466.4

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

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

                    if -2.4500000000000001e29 < t < -1.22e-26

                    1. Initial program 95.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 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--.f6438.8

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

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

                    if -1.22e-26 < t < 1.9000000000000001e26

                    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 z around 0

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

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

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

                      \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                    6. Step-by-step derivation
                      1. Applied rewrites37.7%

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

                        \[\leadsto x - -1 \cdot \color{blue}{a} \]
                      3. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto x - \left(\mathsf{neg}\left(a\right)\right) \]
                        2. lower-neg.f6436.3

                          \[\leadsto x - \left(-a\right) \]
                      4. Applied rewrites36.3%

                        \[\leadsto x - \left(-a\right) \]
                    7. Recombined 3 regimes into one program.
                    8. Add Preprocessing

                    Alternative 14: 49.9% accurate, 1.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-23}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;x - \left(-a\right)\\ \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.95e+28)
                         t_1
                         (if (<= t -1.9e-23)
                           (* (- 1.0 y) z)
                           (if (<= t 1.9e+26) (- x (- a)) 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.95e+28) {
                    		tmp = t_1;
                    	} else if (t <= -1.9e-23) {
                    		tmp = (1.0 - y) * z;
                    	} else if (t <= 1.9e+26) {
                    		tmp = x - -a;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (b - a) * t
                        if (t <= (-1.95d+28)) then
                            tmp = t_1
                        else if (t <= (-1.9d-23)) then
                            tmp = (1.0d0 - y) * z
                        else if (t <= 1.9d+26) then
                            tmp = x - -a
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = (b - a) * t;
                    	double tmp;
                    	if (t <= -1.95e+28) {
                    		tmp = t_1;
                    	} else if (t <= -1.9e-23) {
                    		tmp = (1.0 - y) * z;
                    	} else if (t <= 1.9e+26) {
                    		tmp = x - -a;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = (b - a) * t
                    	tmp = 0
                    	if t <= -1.95e+28:
                    		tmp = t_1
                    	elif t <= -1.9e-23:
                    		tmp = (1.0 - y) * z
                    	elif t <= 1.9e+26:
                    		tmp = x - -a
                    	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.95e+28)
                    		tmp = t_1;
                    	elseif (t <= -1.9e-23)
                    		tmp = Float64(Float64(1.0 - y) * z);
                    	elseif (t <= 1.9e+26)
                    		tmp = Float64(x - Float64(-a));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = (b - a) * t;
                    	tmp = 0.0;
                    	if (t <= -1.95e+28)
                    		tmp = t_1;
                    	elseif (t <= -1.9e-23)
                    		tmp = (1.0 - y) * z;
                    	elseif (t <= 1.9e+26)
                    		tmp = x - -a;
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.95e+28], t$95$1, If[LessEqual[t, -1.9e-23], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.9e+26], N[(x - (-a)), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(b - a\right) \cdot t\\
                    \mathbf{if}\;t \leq -1.95 \cdot 10^{+28}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq -1.9 \cdot 10^{-23}:\\
                    \;\;\;\;\left(1 - y\right) \cdot z\\
                    
                    \mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\
                    \;\;\;\;x - \left(-a\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -1.9499999999999999e28 or 1.9000000000000001e26 < t

                      1. Initial program 92.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 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--.f6466.4

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

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

                      if -1.9499999999999999e28 < t < -1.90000000000000006e-23

                      1. Initial program 95.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 z around inf

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

                          \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
                        2. mul-1-negN/A

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

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

                          \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                        5. mul-1-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
                        6. negate-sub2N/A

                          \[\leadsto \left(1 - y\right) \cdot z \]
                        7. lower--.f6432.9

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

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

                      if -1.90000000000000006e-23 < t < 1.9000000000000001e26

                      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 z around 0

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

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

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

                        \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                      6. Step-by-step derivation
                        1. Applied rewrites37.7%

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

                          \[\leadsto x - -1 \cdot \color{blue}{a} \]
                        3. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto x - \left(\mathsf{neg}\left(a\right)\right) \]
                          2. lower-neg.f6436.3

                            \[\leadsto x - \left(-a\right) \]
                        4. Applied rewrites36.3%

                          \[\leadsto x - \left(-a\right) \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 15: 46.0% accurate, 1.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -7.7 \cdot 10^{+130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-281}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-178}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+189}:\\ \;\;\;\;\mathsf{fma}\left(t, 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 y) z)))
                         (if (<= z -7.7e+130)
                           t_1
                           (if (<= z 7.5e-281)
                             (fma t b x)
                             (if (<= z 8.5e-178)
                               (* (- 1.0 t) a)
                               (if (<= z 1.9e+189) (fma t b x) t_1))))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double t_1 = (1.0 - y) * z;
                      	double tmp;
                      	if (z <= -7.7e+130) {
                      		tmp = t_1;
                      	} else if (z <= 7.5e-281) {
                      		tmp = fma(t, b, x);
                      	} else if (z <= 8.5e-178) {
                      		tmp = (1.0 - t) * a;
                      	} else if (z <= 1.9e+189) {
                      		tmp = fma(t, b, x);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b)
                      	t_1 = Float64(Float64(1.0 - y) * z)
                      	tmp = 0.0
                      	if (z <= -7.7e+130)
                      		tmp = t_1;
                      	elseif (z <= 7.5e-281)
                      		tmp = fma(t, b, x);
                      	elseif (z <= 8.5e-178)
                      		tmp = Float64(Float64(1.0 - t) * a);
                      	elseif (z <= 1.9e+189)
                      		tmp = fma(t, 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 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.7e+130], t$95$1, If[LessEqual[z, 7.5e-281], N[(t * b + x), $MachinePrecision], If[LessEqual[z, 8.5e-178], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.9e+189], N[(t * b + x), $MachinePrecision], t$95$1]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(1 - y\right) \cdot z\\
                      \mathbf{if}\;z \leq -7.7 \cdot 10^{+130}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 7.5 \cdot 10^{-281}:\\
                      \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                      
                      \mathbf{elif}\;z \leq 8.5 \cdot 10^{-178}:\\
                      \;\;\;\;\left(1 - t\right) \cdot a\\
                      
                      \mathbf{elif}\;z \leq 1.9 \cdot 10^{+189}:\\
                      \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -7.7000000000000004e130 or 1.8999999999999999e189 < z

                        1. Initial program 90.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 z around inf

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

                            \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \]
                          2. mul-1-negN/A

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

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

                            \[\leadsto \left(-1 \cdot \left(y - 1\right)\right) \cdot \color{blue}{z} \]
                          5. mul-1-negN/A

                            \[\leadsto \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z \]
                          6. negate-sub2N/A

                            \[\leadsto \left(1 - y\right) \cdot z \]
                          7. lower--.f6468.5

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

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

                        if -7.7000000000000004e130 < z < 7.49999999999999968e-281 or 8.5000000000000001e-178 < z < 1.8999999999999999e189

                        1. Initial program 96.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. *-commutativeN/A

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

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

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

                          \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
                        5. Step-by-step derivation
                          1. +-commutative58.0

                            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                          2. negate-sub258.0

                            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                          3. fp-cancel-sub-sign-inv58.0

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

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

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

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

                          if 7.49999999999999968e-281 < z < 8.5000000000000001e-178

                          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 a around inf

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

                              \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                            2. mul-1-negN/A

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

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

                              \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                            6. negate-sub2N/A

                              \[\leadsto \left(1 - t\right) \cdot a \]
                            7. lower--.f6437.5

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

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

                        Alternative 16: 43.1% accurate, 2.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - t\right) \cdot a\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+73}:\\ \;\;\;\;\mathsf{fma}\left(t, 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 -6.2e+17) t_1 (if (<= a 1.6e+73) (fma t 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 <= -6.2e+17) {
                        		tmp = t_1;
                        	} else if (a <= 1.6e+73) {
                        		tmp = fma(t, 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 <= -6.2e+17)
                        		tmp = t_1;
                        	elseif (a <= 1.6e+73)
                        		tmp = fma(t, 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, -6.2e+17], t$95$1, If[LessEqual[a, 1.6e+73], N[(t * b + x), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(1 - t\right) \cdot a\\
                        \mathbf{if}\;a \leq -6.2 \cdot 10^{+17}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;a \leq 1.6 \cdot 10^{+73}:\\
                        \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if a < -6.2e17 or 1.59999999999999991e73 < a

                          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 a around inf

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

                              \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                            2. mul-1-negN/A

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

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

                              \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                            6. negate-sub2N/A

                              \[\leadsto \left(1 - t\right) \cdot a \]
                            7. lower--.f6454.2

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

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

                          if -6.2e17 < a < 1.59999999999999991e73

                          1. Initial program 97.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. *-commutativeN/A

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

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

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

                            \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
                          5. Step-by-step derivation
                            1. +-commutative62.9

                              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                            2. negate-sub262.9

                              \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                            3. fp-cancel-sub-sign-inv62.9

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

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

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

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

                          Alternative 17: 39.1% accurate, 2.1× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+128}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+32}:\\ \;\;\;\;\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.3e+128) (* b y) (if (<= y 6.5e+32) (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.3e+128) {
                          		tmp = b * y;
                          	} else if (y <= 6.5e+32) {
                          		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.3e+128)
                          		tmp = Float64(b * y);
                          	elseif (y <= 6.5e+32)
                          		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.3e+128], N[(b * y), $MachinePrecision], If[LessEqual[y, 6.5e+32], N[(t * b + x), $MachinePrecision], N[((-z) * y), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y \leq -2.3 \cdot 10^{+128}:\\
                          \;\;\;\;b \cdot y\\
                          
                          \mathbf{elif}\;y \leq 6.5 \cdot 10^{+32}:\\
                          \;\;\;\;\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.29999999999999998e128

                            1. Initial program 88.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--.f6477.7

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

                              \[\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 rewrites41.5%

                                \[\leadsto b \cdot y \]

                              if -2.29999999999999998e128 < y < 6.4999999999999994e32

                              1. Initial program 97.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. *-commutativeN/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \color{blue}{x}\right) \]
                              5. Step-by-step derivation
                                1. +-commutative52.0

                                  \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                                2. negate-sub252.0

                                  \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) \]
                                3. fp-cancel-sub-sign-inv52.0

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

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

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

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

                                if 6.4999999999999994e32 < 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--.f6468.3

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

                                  \[\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. lower-neg.f6438.4

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

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

                              Alternative 18: 36.0% accurate, 2.3× speedup?

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

                                1. Initial program 91.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 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.8

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

                                  \[\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.7%

                                    \[\leadsto b \cdot t \]

                                  if -4.09999999999999994e66 < t < 5.8e26

                                  1. Initial program 97.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 z around 0

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

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

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

                                    \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites37.7%

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

                                      \[\leadsto x - -1 \cdot \color{blue}{a} \]
                                    3. Step-by-step derivation
                                      1. mul-1-negN/A

                                        \[\leadsto x - \left(\mathsf{neg}\left(a\right)\right) \]
                                      2. lower-neg.f6434.5

                                        \[\leadsto x - \left(-a\right) \]
                                    4. Applied rewrites34.5%

                                      \[\leadsto x - \left(-a\right) \]

                                    if 5.8e26 < t

                                    1. Initial program 91.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 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--.f6466.5

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

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

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

                                        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot t \]
                                      2. lower-neg.f6438.2

                                        \[\leadsto \left(-a\right) \cdot t \]
                                    7. Applied rewrites38.2%

                                      \[\leadsto \left(-a\right) \cdot t \]
                                  7. Recombined 3 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 19: 34.9% accurate, 2.3× speedup?

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

                                    1. Initial program 91.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 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.7

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

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

                                        \[\leadsto b \cdot t \]

                                      if -4.09999999999999994e66 < t < 8.50000000000000075e65

                                      1. Initial program 97.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 z around 0

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

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

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

                                        \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites37.8%

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

                                          \[\leadsto x - -1 \cdot \color{blue}{a} \]
                                        3. Step-by-step derivation
                                          1. mul-1-negN/A

                                            \[\leadsto x - \left(\mathsf{neg}\left(a\right)\right) \]
                                          2. lower-neg.f6433.4

                                            \[\leadsto x - \left(-a\right) \]
                                        4. Applied rewrites33.4%

                                          \[\leadsto x - \left(-a\right) \]
                                      7. Recombined 2 regimes into one program.
                                      8. Add Preprocessing

                                      Alternative 20: 26.5% accurate, 1.9× speedup?

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

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

                                          \[\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 rewrites36.8%

                                            \[\leadsto b \cdot t \]

                                          if -2.79999999999999988e47 < t < -1.3799999999999999e-244

                                          1. Initial program 97.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--.f6439.1

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

                                            \[\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 rewrites21.8%

                                              \[\leadsto b \cdot y \]

                                            if -1.3799999999999999e-244 < t < 1.24999999999999993e71

                                            1. Initial program 97.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} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites17.9%

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

                                            Alternative 21: 24.9% accurate, 2.5× speedup?

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

                                              1. Initial program 94.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} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites37.4%

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

                                                if -4.8e119 < x < 4.3000000000000002e105

                                                1. Initial program 95.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 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--.f6435.9

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

                                                  \[\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 rewrites19.2%

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

                                                Alternative 22: 20.5% accurate, 3.3× speedup?

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

                                                  1. Initial program 94.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} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites37.0%

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

                                                    if -6.3999999999999996e106 < x < 5.6000000000000004e109

                                                    1. Initial program 95.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. negate-sub2N/A

                                                        \[\leadsto a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \]
                                                      2. mul-1-negN/A

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

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

                                                        \[\leadsto \left(-1 \cdot \left(t - 1\right)\right) \cdot \color{blue}{a} \]
                                                      5. mul-1-negN/A

                                                        \[\leadsto \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a \]
                                                      6. negate-sub2N/A

                                                        \[\leadsto \left(1 - t\right) \cdot a \]
                                                      7. lower--.f6431.5

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

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

                                                      \[\leadsto a \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites12.7%

                                                        \[\leadsto a \]
                                                    7. Recombined 2 regimes into one program.
                                                    8. Add Preprocessing

                                                    Alternative 23: 15.6% accurate, 28.4× 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.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} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites15.6%

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

                                                      Reproduce

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